21,7 → 21,9 |
this.aucuneRueSelectionnee = "Aucune rue sélectionnée"; |
this.nomDeRueInconnue = "Nom de rue inconnu"; |
this.zoneGeo = null; |
} |
this.groupeZonesGeo = null; |
this.serviceCoordSearchUrl = ""; |
} |
WidgetSaisieSauvages.prototype = new WidgetSaisie(); |
|
// surcharge |
157,17 → 159,24 |
WidgetSaisieSauvages.prototype.initialiserGoogleMap = function() { |
var lthis = this; |
this.latLngDeb = new google.maps.LatLng(48.8543, 2.3483);// Paris par défaut |
|
|
// si param "groupes_zones_geo" |
if (this.groupeZonesGeo != "") { |
var url = this.serviceCoordSearchUrl + "?groupe_zones=" + this.groupeZonesGeo; |
$.getJSON(url, function(data) { |
console.log(data); |
lthis.latLngDeb = new google.maps.LatLng(data.groupe.centroide.lat, data.groupe.centroide.lng); |
lthis.suiteInitialiserGoogleMap(); |
}); |
} |
// si param "zone_geo" |
if (this.zoneGeo != "") { |
var url = "http://api.tela-botanica.org/service:cel:coordSearch?zone=" + this.zoneGeo; |
else if (this.zoneGeo != "") { |
var url = this.serviceCoordSearchUrl + "?zone=" + this.zoneGeo; |
$.getJSON(url, function(data) { |
lthis.latLngDeb = new google.maps.LatLng(data.lat, data.lng); |
lthis.suiteInitialiserGoogleMap(); |
}); |
|
} |
|
// si param "ville" |
else { |
if (this.ville == 'Marseille') { |
178,11 → 187,8 |
} |
this.suiteInitialiserGoogleMap(); |
} |
|
|
} |
|
|
WidgetSaisieSauvages.prototype.suiteInitialiserGoogleMap = function() { |
var options = { |
zoom: 14, // avant : 16 |