[thelist] Google maps icon not appearing
Jay Blanchard
jblanchard at pocket.com
Mon Jun 11 15:17:31 CDT 2007
[snip]
function load()
{
if (GBrowserIsCompatible())
{
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(38.758640, -121.284750), 17);
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var point = new GLatLng(38.758640,
-121.284750);
var icon = new GIcon();
icon.image =
"http://grassies/g/maps/icons/GrassieBand.png";
icon.shadow =
"http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(18, 24);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5,
1);
function createMarker(point, text)
{
var marker = new GMarker(point, icon);
GEvent.addListener(marker, "click",
function()
{
marker.openInfoWindowHtml(text);
});
return marker;
}
map.addOverlay(createMarker(point, "Our
House:<br />286 Alta Vista Avenue<br />Roseville, CA 95678"));
}
}
[/snip]
Are the images uploaded to the server?
More information about the thelist
mailing list