Subversion Repositories Applications.bazar

Compare Revisions

Regard whitespace Rev 478 → Rev 479

/trunk/bibliotheque/bazar.fonct.google.php
60,11 → 60,29
// On centre la carte sur le languedoc roussillon
center: new google.maps.LatLng(43.84245116699036, 3.768310546875),
zoom: 7,
mapTypeId: google.maps.MapTypeId.G_HYBRID_MAP,
mapTypeId: "OSM",
mapTypeControlOptions: {
mapTypeIds: ["OSM",
google.maps.MapTypeId.ROADMAP,
google.maps.MapTypeId.HYBRID,
google.maps.MapTypeId.SATELLITE,
google.maps.MapTypeId.TERRAIN]
},
mapTypeControl: true,
scaleControl: true
};
map = new google.maps.Map(document.getElementById("map"), optionsGoogleMapsv3);
map.mapTypes.set("OSM", new google.maps.ImageMapType({
getTileUrl: function(coord, zoom) {
return "http://osm.tela-botanica.org/tile/" + // cache de tuiles avec nginx
zoom + "/" + coord.x + "/" + coord.y + ".png";
},
tileSize: new google.maps.Size(256, 256),
isPng: true,
alt: "OpenStreetMap",
name: "OSM",
maxZoom: 19
}));
 
google.maps.event.addListener(map, "click", function(event) {
if (marker != null) {
105,6 → 123,9
};
function showAddress() {
var adresse = document.getElementById("bf_adresse").value;
if (adresse == "") {
return false;
}
var ville = "";
if (document.getElementById("bf_ville")) {
ville = document.getElementById("bf_ville").value ;
118,7 → 139,7
pays = document.getElementById("bf_pays").value;
}
var address = adresse + \' \' + \' \' + cp + \' \' + ville + \' \' +pays ;
if (geocoder) {
if (address && geocoder) {
geocoder.geocode({
address: address
}, function(result, status) {
125,9 → 146,6
if (status != google.maps.GeocoderStatus.OK) {
alert(address + " not found");
} else {
marker.setMap(null);
marker = null;
//map.setCenter(point, 13);
map.fitBounds(result[0].geometry.viewport);
marker = new google.maps.Marker({
position: result[0].geometry.location,