On Dec 30, 8:04 am, Philipp <[email protected]> wrote:
> Hi,
>
> I'm trying to create a Marker using the new google ajax API.
> I'm using the following code, did already a lot of changes but I
> can't see a marker:
>
> <html>
>   <head>
>     <script type="text/javascript"
>             src="http://www.google.com/jsapi?key=mykey></script>
>   </head>
>   <body>
>     <div id="map" style="width: 500px; height: 500px"></div>
>     <script type="text/javascript">
>       google.load("maps", "2");
>
>       // Call this function when the page has been loaded
>       function initialize() {
>         var map = new google.maps.Map2(document.getElementById
> ("map"));
>         map.setCenter(new google.maps.LatLng(47.76744843,
> 13.01871967), 13);
>
>         map.addOverlay(new google.maps.GLatLng(17.502030, 78.382801));
>
>         map.GMarker(new google.maps.GLatLng(17.502030, 78.382801));
>       }
>       google.setOnLoadCallback(initialize);
>     </script>
>   </body>
> </html>
>

Neither can we.  You might try centering your map on the place you
have the marker:
map.setCenter(new google.maps.LatLng(47.76744843, 13.01871967), 13);
map.GMarker(new google.maps.GLatLng(17.502030, 78.382801));

You might try calling addOverlay on the GMarker (a GLatLng isn't an
overlay).

If those suggestions don't help, please follow the posting guidelines
and post a link to your map, not code.

  -- Larry

--

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.


Reply via email to