I would like to get center coordinates of a country using Javascript. Is there any xml file that provides this kind of data, for use in a web application? I am basically trying to put data on the map using country names in OpenLayers.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Using Google Maps API you can use the Geocoder class for this.
You might want to examine the
results[]array a bit more than just getting index 0, but this should get you started in the right direction.