The position property expects a LatLng object.
Try
var marker = new google.maps.Marker({
position: new google.maps.LatLng(53.558584,-7.987061),
map: map
});
You're using the marker variable twice: as local inside the
createMarker() function and as global inside the function mapclick().
That's possible but isn't that confusing?
On Dec 30, 12:49 pm, Adam <[email protected]> wrote:
> Got the code 99% working since the original post, my issue is now regarding
> the loading of a marker if one is already set, I have an if statement that
> says if the lat and lon variable are not set then output 'var marker =
> null;' but if lat and lon are set then output the below code:
>
> var marker = new google.maps.Marker({ position: (53.558584,-7.987061), map:
>
> > map });
>
> I'm getting the below error and can't seem to figure it out, is it the format
> that position is in is incorrect!?
>
> Invalid value for property <position>: -7.987061
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.