Hi,

I am trying to slice the point given to the GMarker. I am reading the
points from a text file and i want to get rid of some decimals shown
in the sidebar. The alert(point) gives me the full value seperated by
a , back, but whatever I am going to do to the point (e.g. var x =
point.slice(0, 9); ) isn't working and the function isn't producing
any output in the sidebar at all. I have to say I added var x =
point.slice(0, 9); a line below the alert call.

How can I slice the point values? I need the precission for locating
the points on the map but the user should not see all the decimals...

function createMarker(point,typ,stnr,label,html) {
        var marker = new GMarker(point,{title: label, icon: typ});
        GEvent.addListener(marker, "click", function() {
            map.setCenter(point, 16);
            alert(point);
            document.getElementById("sidebar_html").innerHTML =
"Coordinates: " + point + html;
            document.getElementById("sidebar_label").innerHTML = label;
        });

Thanks, Thomas
--~--~---------~--~----~------------~-------~--~----~
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