diff --git a/Mapero.php b/Mapero.php index f1328a8..f470bc9 100644 --- a/Mapero.php +++ b/Mapero.php @@ -61,8 +61,50 @@ $plantilla ="mapa"; var geojsonAuxiliar = $obj ;"; +$ids = json_decode($otro_json[0]); + foreach ($ids as $clave => $valor) { + if($valor !=""){ + + + $obj=file_get_contents("$valor[0]"); + $li .=""; + $layer .= " + var geojsonAux_$clave = L.geoJson(geojsonAuxiliar_$clave, { + + pointToLayer: function(feature, latlng) { + var smallIcon = new L.Icon({ + iconSize: [60, 60], + iconAnchor: [13, 27], + popupAnchor: [1, -24], + /* iconUrl: feature.properties.icon.iconUrl*/ + iconUrl: 'http://localhost/default/tupali/milfs/images/secure/?file=150/da6d16547658ebc06c5378b30d1ee4bf.png' + + }); + return L.marker(latlng, {icon: smallIcon}); + }, + + onEachFeature: function(feature, layer) { + var popupText = feature.properties.description + + + layer.bindPopup(popupText); } + }); + + + "; + $add_layer .= "markers.addLayer(geojsonAux_$clave);"; + $capas_nombre .="geojsonAux_$clave,"; + $capas .= "{ + '$clave': geojsonAux_$clave + };"; + $overlays =" + var overlays = $capas "; + } + } +//$obj=file_get_contents("$otro_json[0]"); +//echo ""; + echo $li; + ?>