Commit b0eed1bd authored by Raph El's avatar Raph El
Browse files

Hotfix map resize

parent d5a4b028
......@@ -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: 0px !important;
margin-left: 6px !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;
......
......@@ -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 : {
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment