0

Suppose I search a place on google placeApi location something like (Texas) now I want to mark the area of Texas as a highlighted or draw boundary. So for drawing polygon i need the the lat long of that area. I search in google i found those links. From those links I understand that google doesn't provide the information.I need a solution in google map on google map Using SWIFT. So my question is how can i get those area lat long? Here is some link of my requirement-

Google Maps how to Show city or an Area outline

Outline and shade regions using the Google Maps JavaScript API https://maps.google.se/maps?q=sk%C3%A5ne&hl=sv&ie=UTF8&ll=57.1422,13.337402&spn=5.468408,16.907959&sll=39.290385,-76.612189&sspn=0.243658,0.528374&hnear=Sk%C3%A5ne+l%C3%A4n&t=m&z=7

ScreenShoots:- Something similar what I want

Shubham
  • 17
  • 5
  • 4
    You need quite a bit more than a singular pair of latitude and longitude of that area -- it sounds like you need all of the points for a polygon describing the area. – jnpdx Oct 06 '21 at 19:30
  • Exactly, I got struck here only how to get these points? – Shubham Oct 06 '21 at 19:35
  • "Place name":CLLocationCoordinate2D("latitude":28.6139391, "longitude":"77.2090212) Place ID":"Optional("[ "Types":"locality", "political", "Name":"New Delhi", "Short Name":"New Delhi", "Types":administrative_area_level_1, "political", "Name":"Delhi", "Short Name":"DL", "Types":"country", "political", "Name":"India", "Short Name":"IN" ] – Shubham Oct 06 '21 at 19:35
  • This is json response which I get after hitting place api. – Shubham Oct 06 '21 at 19:36
  • 1
    https://stackoverflow.com/questions/18601186/google-maps-api-get-region-polygon – jnpdx Oct 06 '21 at 19:38
  • Your JSON dataset contains only one pair of coordinates. How does it help you border lines to enclose a given city? – El Tomato Oct 07 '21 at 00:32
  • This is what I trying to solve or find a way how can we get boundary details if have lat and long for particular region. – Shubham Oct 07 '21 at 05:09

0 Answers0