Hmmm, thanks for the response. I've added the latlng which displays
the marker, but only in the top left of the defined area. I've double
checked the co-ords and they are right for the location I want which
is in the centre, it's just that the marker won't display there (Ayres
Street).
//<![CDATA[
function initialize() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map_canvas"));
map.setCenter(new GLatLng(51.503064, -0.095368), 16);
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var point = new GLatLng(51.503064, -0.095368);
map.addOverlay(new GMarker(51.503064, -0.095368));
}
}
//]]>
The site is here:http://www.whistledownstudios.com/contact.html
Any thoughts appreciated.
Cheers
On Sep 24, 9:53 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Sep 24, 1:33 am, chilesl <[EMAIL PROTECTED]> wrote:
>
> > Hi
>
> > I've searched on the posts but can't see anything that works. I have a
> > VERY simple map with one marker but for some reason the marker is not
> > appearing. I've tried a few things and have the controls working but
> > not the marker.
>
> > The site is here:http://www.whistledownstudios.com/contact.html
>
> > code is thus:
> > function initialize() {
> > if (GBrowserIsCompatible()) {
> > var map = new GMap2(document.getElementById("map_canvas"));
> > map.setCenter(new GLatLng(51.503064, -0.095368), 16);
> > map.addControl(new GSmallMapControl());
> > map.addControl(new GMapTypeControl());
> > var point = new GLatLng(51.503064, -0.095368);
> > var marker = createMarker(point);
>
> You have no createMarker function defined
>
> > map.addOverlay(new GMarker());
>
> GMarker takes a minimum of a GLatLng as an argument.
>
> Both of these errors should be obvious in any browser if you look at
> the javascript errors.
>
>
>
> > }
> > }
>
> > Appreciate any advice
> > Thanks
> >Lawrence
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---