Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 09-15-2011, 07:09 AM   #1 (permalink)
Latest app on AppStore
 
mgales's Avatar
 
Join Date: Jun 2009
Location: Basingstoke, Hampshire. UK
Posts: 119
mgales is on a distinguished road
Exclamation MapKit & CoreData

Hi everyone,

I currently working on an application that will use MapKit and CoreData. The CoreData part will store/restore map pin co-ordinates and place them on the MapView. I am however a little stuck...

Currently, I am able to read and write CoreLocation values (Long/Lat) using CoreData. What I am stuck with though is the correct way to add the map pins to the MapView so the managed objects from CoreData are kept in place. These I assume would be required to remove a specific object from the MapView and the CoreData store.

I currently do not require custom annotations (basic coloured pins are enough).

My CoreData managedObjectContext variable is called (context), and is accessable to my MapViewController.

My CoreData entity is called LocationInfo.

My longitude and latitude attributes are called locLong and locLat and are presently stored as Double values in my DataModel.

Any assistance in getting the pins placed on my MapView would be of great help.

If you require any further information I will provide what I can!

Thank you in advance.
__________________
Mark

Check out my apps on the AppStore

mgales is offline   Reply With Quote
Old 10-20-2011, 10:09 PM   #2 (permalink)
Registered Member
 
Join Date: Jan 2009
Posts: 113
jonusx is on a distinguished road
Default

if you create a managed object subclass, you can implement the annotation protocol and use those as custom annotations. This is how I do it for one of the apps I made. It allows you to do the fetch and put the results directly on the map. Easy!
__________________
What do you have to share? Share and view pics Oneshare

Play Magic: The Gathering? Try The Sylvan Archives!

Warhammer 40k your thing? W40k Manager is your thing.

Like karaoke? Try iSing Karaoke Locator
jonusx is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 371
8 members and 363 guests
bignoggins, epaga, hussain1982, jcdevelopments, LunarMoon, omagod, pinacate, skog
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,643
Threads: 94,110
Posts: 402,860
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Diligent
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:54 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0