[BUG FIX] geocode position [0;0] => ocean
This commit is contained in:
parent
527026a6b7
commit
f42f3820e9
1 changed files with 10 additions and 3 deletions
|
@ -1,12 +1,15 @@
|
|||
var LON = '2.428462';
|
||||
var LAT = '46.538192';
|
||||
|
||||
function initCarto() {
|
||||
OSM = L.tileLayer("http://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png", {
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
});
|
||||
|
||||
var LON = '2.428462';
|
||||
var LAT = '46.538192';
|
||||
position = get_position() || default_position();
|
||||
|
||||
position = get_position() || {lon: LON, lat: LAT, zoom: 13};
|
||||
if (position.lon == "0" && position.lat == "0")
|
||||
position = default_position();
|
||||
|
||||
if (typeof position.zoom == 'undefined')
|
||||
position.zoom = 13;
|
||||
|
@ -36,6 +39,10 @@ function initCarto() {
|
|||
display_qp(JSON.parse($("#quartier_prioritaires").val()));
|
||||
}
|
||||
|
||||
function default_position (){
|
||||
return {lon: LON, lat: LAT, zoom: 13}
|
||||
}
|
||||
|
||||
function add_event_freeDraw() {
|
||||
freeDraw.on('markers', function (e) {
|
||||
$("#json_latlngs").val(JSON.stringify(e.latLngs));
|
||||
|
|
Loading…
Reference in a new issue