Groups
Sign in
Groups
openaddresses
Conversations
About
Send feedback
Help
How to get the coordinates from the GeoJSON format?
716 views
Skip to first unread message
stickupboi
unread,
Oct 2, 2010, 6:39:36 PM
10/2/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openaddresses
Hi
I'm trying to create a little script that automatically gets
coordinates for a list of adresses.
My script creates an url like
http://www.openaddresses.org/addresses/?queryable=city,housenumber,street&city__ilike=%Lausanne%&housenumber__like=31&street__ilike=%Chemin%20Des%20Fleurettes%&calllback=savecoord
which calls my function savecoord.
My problem is that I don't know how to get out the coordinates from
the response. I guess it looks similar to this:
function savecoord(){
coordpoint = response.features.geometry.coordinates;
}
Anybody here who can help me?
"Hans-Jörg Stark (OpenAddresses.ch)"
unread,
Oct 4, 2010, 10:31:31 AM
10/4/10
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to openad...@googlegroups.com
try the following:
for (var feature in response.features){
longitude = feature.geometry.coordinates.0;
latitude = feature.geometry.coordinates.1;
}
cheers,
Hans-Jörg
Reply all
Reply to author
Forward
0 new messages