Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Albert Beltran
map
Commits
b0eed1bd
Commit
b0eed1bd
authored
Nov 28, 2018
by
Raph El
Browse files
Hotfix map resize
parent
d5a4b028
Changes
3
Hide whitespace changes
Inline
Side-by-side
assets/css/map.css
View file @
b0eed1bd
...
...
@@ -16,7 +16,7 @@
border-radius
:
25px
;
width
:
53px
!important
;
height
:
53px
!important
;
background-color
:
#FFF
!important
;
background-color
:
transparent
!important
;
padding
:
10px
!important
;
font-size
:
15px
!important
;
font-family
:
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
!important
;
...
...
@@ -37,11 +37,11 @@
.marker-cluster-small
div
{
border-radius
:
25px
;
margin-left
:
0
px
!important
;
margin-left
:
6
px
!important
;
margin-top
:
0px
!important
;
width
:
20px
!important
;
height
:
20px
!important
;
background-color
:
#FFF
!important
;
background-color
:
transparent
!important
;
padding
:
10px
!important
;
font-size
:
15px
!important
;
font-family
:
"Helvetica Neue"
,
Helvetica
,
Arial
,
sans-serif
!important
;
...
...
assets/js/map.js
View file @
b0eed1bd
...
...
@@ -39,6 +39,9 @@ var mapObj = {
}
});
}
setTimeout
(
function
(){
mapObj
.
map
.
invalidateSize
()},
400
);
},
addElts
:
function
(
data
,
addPopUp
=
false
){
$
.
each
(
data
,
function
(
k
,
v
){
...
...
@@ -48,11 +51,13 @@ var mapObj = {
if
(
mapObj
.
arrayBounds
.
length
>
0
){
mapObj
.
bounds
=
L
.
bounds
(
mapObj
.
arrayBounds
);
var
point
=
mapObj
.
bounds
.
getCenter
()
mapObj
.
map
.
panTo
([
point
.
x
,
point
.
y
]);
//
mapObj.map.panTo([point.x, point.y]);
}
if
(
mapObj
.
activeCluster
===
true
)
mapObj
.
map
.
addLayer
(
mapObj
.
markersCluster
);
//mapObj.map.invalidateSize();
},
clearMap
:
function
(){
// Supprime les markers
...
...
@@ -179,7 +184,7 @@ var mapCustom = {
}
else
{
c
+=
'
large
'
;
}
return
L
.
divIcon
({
html
:
'
<div>
<span>
'
+
childCount
+
'
</
span></
div>
'
,
className
:
'
marker-cluster
'
+
c
,
iconSize
:
new
L
.
Point
(
40
,
40
)
});
return
L
.
divIcon
({
html
:
'
<div>
'
+
childCount
+
'
</div>
'
,
className
:
'
marker-cluster
'
+
c
,
iconSize
:
new
L
.
Point
(
40
,
40
)
});
}
},
popup
:
{
...
...
views/co/index.php
View file @
b0eed1bd
...
...
@@ -44,8 +44,8 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->get
<div
style=
""
>
<nav
class=
"header-map index2"
>
<div
class=
"container"
>
<!-- Brand and toggle get grouped for better mobile display -->
<div
class=
"navbar-header page-scroll pull-left"
>
<!-- Brand and toggle get grouped for better mobile display -->
<div
class=
"navbar-header page-scroll pull-left"
>
<a
href=
"#"
class=
"lbh"
>
<img
src=
"
<?php
echo
Yii
::
app
()
->
theme
->
baseUrl
;
?>
/assets/img/LOGOS/
<?php
echo
Yii
::
app
()
->
params
[
"CO2DomainName"
];
?>
/logo-min.png"
style=
"padding-right:20px;"
class=
"logo-menutop pull-left"
height=
30
>
</a>
...
...
@@ -91,14 +91,16 @@ HtmlHelper::registerCssAndScriptsFiles($cssAnsScriptFilesModule, Yii::app()->get
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
modules
.
map
=
<?php
echo
json_encode
(
Map
::
getConfig
()
)
?>
;
jQuery
(
document
).
ready
(
function
()
{
var
paramsMap
=
{
dragging
:
false
,
zoom
:
8
dragging
:
false
,
zoom
:
8
};
mapObj
.
init
(
paramsMap
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment