views:

34

answers:

1

I am using google maps but i can't get map marker for these kind of lat and long values.

Tirunelveli Latitude:8.44 N Longitude:77.44 E. How to convert these to values which can be used by google maps?

I used this but there is no place in the map view area,

function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(8.44, 77.44), 13);
        var marker = new GMarker(new GLatLng(8.44, 77.44));
         map.addOverlay(marker);

        map.setUIToDefault();
      }
    }


<body onload="initialize()" onunload="GUnload()">
+1  A: 

You should just remove N and E. Valid values are just floats with dot (NOT with coma!).

latitude: 8.44

longitude: 77.44

hsz
@hsz please look at my edit.
Chandra
Is it centering your map properly ? Just marker is not visible ?
hsz
@hsz No map visible.
Chandra
Have you called `initialize()` ?
hsz
@hsz look at my edit
Chandra
I used your code and it works fine. I prepended before your JS `<script src="http://maps.google.com/maps?file=api height: 100%"></div>` and it works fine - I see map and marker too.
hsz