I use following code (changing variable names):
var ico = new GIcon();
ico.image = "C:\1.png";
var marker = new GMarker(new GLatLng(lat,lng),
{icon:ico,draggable:false});
map.addOverlay(marker);
this gives following javascript error:
An error has occurred in the script on this page
line : 636
char : 74
error: x is null or not an object
code: 0
url : http://maps.google.com/intl/en_ALL/mapfiles/73/maps2.api/main.js
On May 6, 11:17 am, Mike Williams <[email protected]> wrote:
> You can't mix v1 syntax with v2 syntax.
>
> The v1 syntax is like
> new GMarker(latlng, myIcon)
>
> The v2 syntax is like
> new GMarker(latlng, {icon:myIcon, draggable:true})
>
> Use one or the other (preferably the v2 syntax) but if you try to mix
> them, this doesn't work:
> new GMarker(latlng, myIcon, {draggable:true})
>
> If that's not your problem, post a link to a page that exhibits your
> problem. (Don't post code snippets here)
>
> --http://econym.org.uk/gmap
> The Blackpool Community Church Javascript Team
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---