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

Reply
 
LinkBack Thread Tools Display Modes
Old 01-18-2012, 01:34 PM   #1 (permalink)
Registered Member
 
Join Date: Jan 2012
Posts: 15
franrtorres77 is on a distinguished road
Default pass location data from uitableview to mapview

I'm developing an app which parse a xml file and then the content is populated in a uitablaview. This xml file contains geospatial data with information about the location, speed, latitude, longitude for some trucks. What I want to do is choose one row and then open a detailview with a mkmapview which shows the location of the truck.

Does anyone knows how to load the latitude and longitude of the selected row in the map?

Best regards.
franrtorres77 is offline   Reply With Quote
Old 01-18-2012, 01:48 PM   #2 (permalink)
Registered Member
 
apatsufas's Avatar
 
Join Date: Jan 2011
Location: Thessaloniki, Greece
Posts: 121
apatsufas is on a distinguished road
Default

You should look at the

CLGeocoder Reference if you are using iOS 5 https://developer.apple.com/library/...Reference.html

and the GeocoderDemo example app
https://developer.apple.com/library/...ion/Intro.html

or else the MKReverseGeocoder Reference
https://developer.apple.com/library/...Reference.html

you will also find a lot of tutorials with a search on google
__________________
SQLed - Your Database Manager on the go

iAZConverter - Converts everything from A to Z
apatsufas is offline   Reply With Quote
Old 01-18-2012, 02:11 PM   #3 (permalink)
Registered Member
 
ebender001's Avatar
 
Join Date: Mar 2010
Location: Missouri
Age: 57
Posts: 70
ebender001 is on a distinguished road
Default

Quote:
Originally Posted by franrtorres77 View Post
I'm developing an app which parse a xml file and then the content is populated in a uitablaview. This xml file contains geospatial data with information about the location, speed, latitude, longitude for some trucks. What I want to do is choose one row and then open a detailview with a mkmapview which shows the location of the truck.

Does anyone knows how to load the latitude and longitude of the selected row in the map?

Best regards.
if you already have the lat/long data, just pass those (look at CLLocation class and related) to a new view controller with a map view (look at MKMapView class and related). Insanely easy.

Ed
ebender001 is offline   Reply With Quote
Old 01-18-2012, 02:42 PM   #4 (permalink)
Registered Member
 
Join Date: Jan 2012
Posts: 15
franrtorres77 is on a distinguished road
Default

Quote:
Originally Posted by ebender001 View Post
if you already have the lat/long data, just pass those (look at CLLocation class and related) to a new view controller with a map view (look at MKMapView class and related). Insanely easy.

Ed
In the XML file I have three fields: longitude, latitude and coordinates where in this last one is filled also with: longitude, latitude, height

I will take a look to the class you are referring about.

Thank you
franrtorres77 is offline   Reply With Quote
Old 01-18-2012, 02:52 PM   #5 (permalink)
Registered Member
 
Join Date: Jan 2012
Posts: 15
franrtorres77 is on a distinguished road
Default

Quote:
Originally Posted by ebender001 View Post
if you already have the lat/long data, just pass those (look at CLLocation class and related) to a new view controller with a map view (look at MKMapView class and related). Insanely easy.

Ed
By the way do you know where i can find a sample for passing the lat/long to the mapview?
franrtorres77 is offline   Reply With Quote
Old 01-18-2012, 02:57 PM   #6 (permalink)
Registered Member
 
apatsufas's Avatar
 
Join Date: Jan 2011
Location: Thessaloniki, Greece
Posts: 121
apatsufas is on a distinguished road
Default

Take a look at the GeocoderDemo example app I posted above.

Also Ray Wenderlich has a tutorial which you might find helpful

Introduction to MapKit on iOS Tutorial | Ray Wenderlich
__________________
SQLed - Your Database Manager on the go

iAZConverter - Converts everything from A to Z
apatsufas is offline   Reply With Quote
Old 01-18-2012, 03:00 PM   #7 (permalink)
Registered Member
 
Join Date: Jan 2012
Posts: 15
franrtorres77 is on a distinguished road
Default

Quote:
Originally Posted by apatsufas View Post
Take a look at the GeocoderDemo example app I posted above.

Also Ray Wenderlich has a tutorial which you might find helpful

Introduction to MapKit on iOS Tutorial | Ray Wenderlich
Thank you very much, I ll take a look to that site too.
franrtorres77 is offline   Reply With Quote
Reply

Bookmarks

Tags
coordinates, ios, location, mkmapview, uitableview

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: 398
9 members and 389 guests
7twenty7, Atatator, glenn_sayers, guusleijsten, iphonedevshani, QuantumDoja, Sami Gh, tim0504, VinceYuan
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,674
Threads: 94,122
Posts: 402,907
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Atatator
Powered by vBadvanced CMPS v3.1.0

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