hi, i’ve had a quick look through the ofxiPhone source and could not see an implementation to get the GPS location of the iphone.
just wondering if this has been implemented somewhere?
or if anyone has managed to get GPS data in openframeworks.
ah looks like i’ve found it in the latest svn version of ofxiPhone… awesome!
although now having issues compiling ofxiPhoneMapKit.
can’t seem to find MapKit.framework anywhere…
perhaps i need to download the latest iphone sdk?
I’ve no clue how ofxiphone works so my reply may be a total disaster.
Have a look at : http://www.abstractmachine.net/blog/ofxiphonemapkit/
So basicaly, i would say yes you need the latest iphone sdk which include mapkit (http://developer.apple.com/iphone/program/sdk/maps.html).
Hope it helps.
right clicking on the frameworks group, going to ‘add existing frameworks’ and selecting mapkit from 3.0+ frameworks should do the trick.
we’re working on making this optional, but we just found the compile flags to do this, so it should happen in the next week or so. if you want, you can just comment out the code requiring mapkit
Also, you can use the ofxiPhoneCoreLocation class to get your lat/long if you’re commenting out mapkit
cool, can’t see 3.0+ frameworks in the frameworks folder so assuming it gets installed with the latest iphone sdk.
wish the the download wasn’t so big - 2.5 gigs!
got the the core location example working by removing the 2 mapkit files from,
targets -> iPhone oF -> ‘compile sources’ folder.
thx for your help guys!
ah. they would be here: /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/Frameworks
if you have them
i had to work out a way of getting updated GPS data at the time it comes through, which meant creating some kind of event system which currently isn’t implemented into ofxiPhoneCoreLocation.
i’ve put together ofxLocation - its a copy of the way ofxMultiTouch works updating its listeners and is able send out GPS update events.
nothing big, but thought i’d post since i think its a good idea to include in ofxiPhone addon and it might save someone some time writing.