by carlob · 11y ago · 0 comments
With[{
geopositions = ParallelMap[
First[
StringCases[
URLFetch["http://www.teslamotors.com" <> #],
("https://maps.google.com/maps?daddr=" ~~ a: Except["\""]..) :> Interpreter["StructuredGeoCoordinates"][a]
]
]&,
StringCases[
URLFetch["http://www.teslamotors.com/findus/list/superchargers/United+States"],
"/findus/location/supercharger/" ~~ WordCharacter..
]
]},
GeoGraphics[GeoPath[geopositions[[Last[FindShortestTour[geopositions]]]]]]
]
and the result