cambio url geojson en mapero.php

This commit is contained in:
fredyrivera 2017-02-07 22:22:46 -05:00
parent 64c17d313a
commit 40a914f01e
3 changed files with 1 additions and 121 deletions

View File

@ -256,7 +256,7 @@ map.addControl( new L.Control.Search({
/* $.getJSON("http://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_day.geojson", function(data) { addDataToMap(data, map); });*/
$.getJSON("https://tupale.co/milfs/geojson.php?id=<?php echo $_REQUEST['id'] ?>&buscar=<?php echo $_REQUEST['buscar'] ?>", function(data) { addDataToMap(data, map); });
$.getJSON("milfs/geojson.php?id=<?php echo $_REQUEST['id'] ?>&buscar=<?php echo $_REQUEST['buscar'] ?>", function(data) { addDataToMap(data, map); });
</script>
</body>
</html>

View File

@ -1,62 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Display latitude longitude on marker movement</title>
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<style>
body { margin:0; padding:0; }
#map {width: 100%;height: 280px;}
</style>
</head>
<body onload="javascript:window.parent.document.getElementById('<?php echo $_REQUEST[id]?>').value= '';">
<div id='map'></div>
<?php
if ($_REQUEST[lat] !='') {$lat=$_REQUEST[lat];}else {$lat= "-75.5570125579834";}
if ($_REQUEST[lon] !='') {$lon=$_REQUEST[lon];}else {$lon= "6.2463742841860";}
if ($_REQUEST[zoom] !='') {$zoom=$_REQUEST[zoom];}else {$zoom= "16";}
?>
<script>
var map = L.map('map')
.setView([<?php echo $lon ?>, <?php echo $lat ?>], <?php echo $zoom ?>);
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
//var lat = window.parent.document.getElementById('lat');
//var lng = window.parent.document.getElementById('lon');
//var mapa = window.parent.document.getElementById('<?php echo $_REQUEST[id]?>');
var marker = L.marker([<?php echo $lon ?>,<?php echo $lat ?>],{draggable: true}).addTo(map);
// every time the marker is dragged, update the coordinates container
marker.on('dragend', ondragend);
// Set the initial marker coordinate on load.
ondragend();
function ondragend() {
var m = marker.getLatLng();
var z = map.getZoom();
// lat.value= m.lat;
// lng.value= m.lng;
//mapa.value= m.lng+' '+m.lat+' '+z;
window.parent.document.getElementById('<?php echo $_REQUEST[id]?>').value= m.lng+' '+m.lat+' '+z;
}
</script>
</body>
</html>

View File

@ -1,58 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Mapero</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.7.3/leaflet.css" />
<style>
body { margin:0; padding:0; }
#map {width: 100%;height: 280px;}
</style>
</head>
<body>
<div id='map'></div>
<?php
if ($_REQUEST[lat] !='') {$lat=$_REQUEST[lat];}else {$lat= "-75.5570125579834";}
if ($_REQUEST[lon] !='') {$lon=$_REQUEST[lon];}else {$lon= "6.2463742841860";}
if ($_REQUEST[zoom] !='') {$zoom=$_REQUEST[zoom];}else {$zoom= "16";}
?>
<script>
var map = L.map('map')
.setView([<?php echo $lon ?>, <?php echo $lat ?>], <?php echo $zoom ?>);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
//var lat = window.parent.document.getElementById('lat');
//var lng = window.parent.document.getElementById('lon');
var mapa = window.parent.document.getElementById('<?php echo $_REQUEST[id]?>');
var marker = L.marker([<?php echo $lon ?>,<?php echo $lat ?>],{draggable: true}).addTo(map);
// every time the marker is dragged, update the coordinates container
marker.on('dragend', ondragend);
// Set the initial marker coordinate on load.
ondragend();
function ondragend() {
var m = marker.getLatLng();
var z = map.getZoom();
// lat.value= m.lat;
// lng.value= m.lng;
mapa.value= m.lng+' '+m.lat+' '+z;
}
</script>
</body>
</html>