how to get location(coordinates) from city name in iphone sdk?

后端 未结 3 879
温柔的废话
温柔的废话 2021-02-03 11:39

friends,

as we have geocoder getfromlocation(locationname,maximumResults) function of google api in android.

i dont see such function in iphone sdk to obtain lat

3条回答
  •  囚心锁ツ
    2021-02-03 12:19

    You can either use the Google geocoder API as desribed in some of the other answers. Alternatively you can use the geocoding services provided by geonames.org.

    You can download my ILGeoNames wrapper classes from GitHub. They provide an Objective C API for using the geonames.org search functions. Among other things you can search for cities by name and get their coordinates.

提交回复
热议问题