2

I'm working on a maps based application and at the moment want to do the following. I have two coordinates a start point and an end point and can draw a line between those points on a map. However what I want to do is to be able to get a list of all countries on the map that the line passes through. I was wondering if this can be done using google maps. I've looked at a number of options but can't get around the way to get this done - how do I do this?

6
  • Line: in the projection Google uses? For long distances, this is not the shortest path between two points on the globe. Commented Dec 8, 2012 at 10:22
  • What is the projection Google uses? This seems to be cylindrical polar while picking the correct stretch based on the viewport but I haven't noticed any uneven scaling. Commented Dec 8, 2012 at 10:29
  • It doesn't have to be google maps - I just want to know how can I set it up so that I can get a list of countries that a line drawn through crosses. Commented Dec 8, 2012 at 10:55
  • Then you have to define the projection AND your data source. If you specify your data source (list of polygons, each of one country) and line (the great circle? The line in a(ny) polar cylindrical projection)? The line between two points does not lie on a sphere. Commented Dec 8, 2012 at 10:58
  • hmmmm ok - any online resources I can checkout for this? Commented Dec 8, 2012 at 11:11

1 Answer 1

0

you could check at various points of the line for the country it's in with:

pOfLine.AddressDetails.Country.CountryName
Sign up to request clarification or add additional context in comments.

1 Comment

yes, check it out here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.