On Jan 4, 11:11 am, donjamessingleton <[email protected]>
wrote:
> http://googlegeodevelopers.blogspot.com/2008/08/mapiconmaker-11-creat...
> presents createLabeledMarkerIcon which works with
>
> function load() {
> if (GBrowserIsCompatible()) {
> var map = new GMap2(document.getElementById("map"));
> map.setCenter(new GLatLng(37.441944, -122.141944), 13);
> var newIcon = MapIconMaker.createLabeledMarkerIcon({addStar: true,
> label: "a", primaryColor: "#00ff00"});
> var marker = new GMarker(map.getCenter(), {icon: newIcon});
> map.addOverlay(marker);
> }
>
> }
>
> Why can I not embed one function call in another, such as
You should be able to. Post a link and maybe someone can tell you
what you are doing wrong. Better yet, loot at the error console and
see what errors you are getting and fix them...
>
> function load() {
> if (GBrowserIsCompatible()) {
> var map = new GMap2(document.getElementById("map"));
> map.setCenter(new GLatLng(37.441944, -122.141944), 13);
> var newIcon = MapIconMaker.createLabeledMarkerIcon({addStar: true,
> label: "a", primaryColor: "#00ff00"});
> var marker = new GMarker(GLatLng(37.441944, -122.141944), {icon:
> newIcon});
missing "new" in the line above, should be:
var marker = new GMarker(new GLatLng(37.441944, -122.141944), {icon:
newIcon});
But it wouldn't have worked with the normal icon either.
> map.addOverlay(marker);
> }
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---