Ciao,
ho seguito questo post per inserire una google maps su un sito. Riscontro però due problemi:
1 - nonostante abbia utilizzato dei tool per trovare le coordinate quest non sono corrette e non ne vogliono sapere di spostarsi. Ho provato infatti ad effettuare modifiche, ma il marker rimane fisso in quel punto
2 - se chiudo la window del marker poi cliccandoci sopra non si riapre più
questo il mio attuale codice:
codice:
<script type="text/javascript">
var map = null;
var geocoder = null;
function load() {
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(36.9280629,14.7196575), 7);
geocoder = new GClientGeocoder();
}
}
function showAddress(address) {
if (geocoder) {
geocoder.getLatLng(
address,
function(point) {
if (!point) {
alert(address + " not found");
} else {
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml( "testo html");
}
}
);
}
}
</script>