Hi guys! I am having difficulty in showing a map. I am creating a marker
with some information and it appears with problems.
Take a look:
http://i259.photobucket.com/albums/hh304/bandafator13/erroGMap.jpg
My code:
function GMapINIT() {
if(GBrowserIsCompatible()) {
geocoder = new GClientGeocoder();
map = new GMap2(document.getElementById("GMap"));
map.setCenter(new GLatLng(0,0), 5, G_SATELLITE_MAP);
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
}
}
function addAddressToMap(response) {
map.clearOverlays();
if (!response || response.Status.code != 200) {
alert("Endereço não encontrado.");
} else {
place = response.Placemark[0];
point = new GLatLng(place.Point.coordinates[1], place.Point.coordinates[0]);
map.setCenter(point);
marker = createMarker(point,"<img
src='imagens/mapas_areas/<%=codArea%>_max.gif' title='Mapa da área
<%=codArea%>' align='left' style='margin-right: 5px;' />"+
"<span style='color: #<%=corArea(codArea,1)%>;'><b><%=empresaFull%> -
<%=unidade%></b></span><br />"+place.address);
map.addOverlay(marker);
map.setZoom(17);
}
}
function createMarker(latlng, txt) {
var marker = new GMarker(latlng);
map.openInfoWindowHtml(latlng, txt);
GEvent.addListener(marker,"click", function() {
map.openInfoWindowHtml(latlng, txt); });
return marker;
}
Does anyone have any idea of what happens?
Thank you!
Hugs!
--
--
Rafael Leite Antonio - Web Developer
[EMAIL PROTECTED]
11 9458.8343
11 2042.3008
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---