문제

I want to use geoJSON-formatted Data in my iPhone app. THere is a JSON parser but no geoJason parser. Anyone can please help me? How do I have to edit the JSON parser to get geoJSON parsing successful?

Is there any geoJson parser for Objective-C out there?

Thanks a lot.

도움이 되었습니까?

해결책

geoJSON is still just JSON. You don't need any special parser behavior to work with it. What you will need is logic in your app's model to deal with the geo-specific keys in the resulting NSDictionary.

You'll probably want to look at the MapKit programming guide and sample code from Apple. That will help you to get an idea of what you'll be translating the geometry and other geoJSON fields into for use in the available views and controllers.

다른 팁

If you want to visualize the output I've put a site together that allows you to edit/display geojson on a map:

http://geojson.monkut.webfactional.com/check/geojson/map.html

NOTE: assumes WGS84

There's some categories GeoJSON+NSArray.h and GeoJSON+NSDictionary.h in SimpleGeo's ObjC client http://github.com/simplegeo/SGClient/tree/master/Classes/Additions/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top