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

Modif cluster small css

parent bb7f357c
......@@ -9,6 +9,7 @@
height: 77px !important;
background-image: url("../images/markers/marker_cluster.png");
background-color: transparent !important;
background-repeat: no-repeat;
}
.marker-cluster div{
......@@ -31,18 +32,20 @@
height: 55px !important;
background-image: url("../images/markers/marker_cluster_small.png");
background-color: transparent !important;
background-repeat: no-repeat;
}
.marker-cluster-small div{
border-radius: 25px;
margin-left: 0px !important;
margin-top: 0px !important;
width: 40px !important;
height: 40px !important;
width: 20px !important;
height: 20px !important;
background-color: #FFF !important;
padding: 5px !important;
padding: 10px !important;
font-size: 15px !important;
font-family: "Helvetica Neue",Helvetica,Arial,sans-serif !important;
color : black;
}
/************* POPUP ************/
......
......@@ -66,35 +66,41 @@ var mapObj = {
},
addMarker : function(elt, addPopUp = false, center=true, opt = {}){
console.log("addMarker", elt, addPopUp);
var myIcon = L.icon({
iconUrl: mapCustom.markers.getMarker(elt),
iconSize: [45, 55],
iconAnchor: [22, 94],
popupAnchor: [-3, -76],
shadowUrl: '',
shadowSize: [68, 95],
shadowAnchor: [22, 94],
});
opt.icon = myIcon ;
if( typeof elt != "undefined" && elt != null &&
typeof elt.geo != "undefined" && elt.geo != null &&
typeof elt.geo.latitude != "undefined" && elt.geo.latitude != null &&
typeof elt.geo.longitude != "undefined" && elt.geo.longitude != null ){
var myIcon = L.icon({
iconUrl: mapCustom.markers.getMarker(elt),
iconSize: [45, 55],
iconAnchor: [22, 94],
popupAnchor: [-3, -76],
shadowUrl: '',
shadowSize: [68, 95],
shadowAnchor: [22, 94],
});
var latLon = [ elt.geo.latitude, elt.geo.longitude ] ;
var marker = L.marker(latLon, opt );
mapObj.markerList.push(marker);
opt.icon = myIcon ;
if(addPopUp === true)
mapObj.addPopUp(marker, elt);
var latLon = [ elt.geo.latitude, elt.geo.longitude ] ;
var marker = L.marker(latLon, opt );
mapObj.markerList.push(marker);
mapObj.arrayBounds.push(latLon);
if(mapObj.activeCluster === true)
mapObj.markersCluster.addLayer(marker);
else{
marker.addTo(mapObj.map);
if(center === true)
mapObj.map.panTo(latLon);
}
if(addPopUp === true)
mapObj.addPopUp(marker, elt);
mapObj.arrayBounds.push(latLon);
if(mapObj.activeCluster === true)
mapObj.markersCluster.addLayer(marker);
else{
marker.addTo(mapObj.map);
if(center === true)
mapObj.map.panTo(latLon);
}
}
console.log("addMarker end", marker);
},
addPolygon: function(){
......
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