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/
精彩评论