notification.alert Won't Show the Marker Position

6 views
Skip to first unread message

Nathan Campos

unread,
Oct 18, 2011, 8:43:55 AM10/18/11
to phon...@googlegroups.com
I'm trying to show to the user the location of a marker using PhoneGap's navigator.notification.alert like this:

    google.maps.event.addListener(marker, "click", function() {
        navigator.notification.alert(
            marker.position,
            "Marker Position",
            "Done"
        );
    });

But this when the popup comes the title is there, but the body text won't. What am I doing wrong?
Message has been deleted

Nathan Campos

unread,
Oct 22, 2011, 10:02:22 AM10/22/11
to phon...@googlegroups.com
I made it to work by converting the position to a String using .toString(), like this:

    google.maps.event.addListener(marker, "click", function() {
        var location = marker.position;
    
        navigator.notification.alert(
            location.toString(),
Reply all
Reply to author
Forward
0 new messages