|
@@ -75,20 +75,17 @@ style="padding:0px"
|
|
map.on('move', function(e) {
|
|
map.on('move', function(e) {
|
|
crosshair.setLatLng(map.getCenter());
|
|
crosshair.setLatLng(map.getCenter());
|
|
});
|
|
});
|
|
- document.getElementById('id_latitude').setAttribute("name","custompoint_lat");
|
|
|
|
- document.getElementById('id_longitude').setAttribute("name","custompoint_long");
|
|
|
|
- document.getElementById('id_altitude').setAttribute("name","custompoint_alt");
|
|
|
|
map.on('moveend', function(e) {
|
|
map.on('moveend', function(e) {
|
|
var lat = map.getCenter().lat.toFixed(5);
|
|
var lat = map.getCenter().lat.toFixed(5);
|
|
var lng = map.getCenter().lng.toFixed(5);
|
|
var lng = map.getCenter().lng.toFixed(5);
|
|
- $('#id_latitude').val(lat);
|
|
|
|
- document.getElementsByName("latitude")[0].value = lat;
|
|
|
|
- $('#id_longitude').val(lng);
|
|
|
|
- document.getElementsByName("longitude")[0].value = lng;
|
|
|
|
|
|
+ $('#id_custompoint-latitude').val(lat);
|
|
|
|
+ $('#id_newpano-latitude').val(lat);
|
|
|
|
+ $('#id_custompoint-longitude').val(lng);
|
|
|
|
+ $('#id_newpano-longitude').val(lng);
|
|
$.get("http://api.geonames.org/astergdem?lat="+lat+"&lng="+lng+"&username=celutz&style=full" ).done(
|
|
$.get("http://api.geonames.org/astergdem?lat="+lat+"&lng="+lng+"&username=celutz&style=full" ).done(
|
|
function(data) {
|
|
function(data) {
|
|
- $('#id_altitude').val(parseInt(data));
|
|
|
|
- document.getElementsByName("altitude")[0].value = parseInt(data);
|
|
|
|
|
|
+ $('#id_custompoint-altitude').val(parseInt(data));
|
|
|
|
+ $('#id_newpano-altitude').val(parseInt(data));
|
|
});
|
|
});
|
|
});
|
|
});
|
|
var panoIcon = L.icon({
|
|
var panoIcon = L.icon({
|