Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500

MapView and set the location

I want to open the mapview and set the home location on map. Once user set the home location just by click then i need to get that location detail like address and latitude and longitude.

 

How can i achieve this.

 

Please help me for this.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: MapView and set the location

use
http://www.blackberry.com/developers/docs/7.1.0api/net/rim/blackberry/api/maps/MapView.html#setLatit...
http://www.blackberry.com/developers/docs/7.1.0api/net/rim/blackberry/api/maps/MapView.html#setLongi...
i guess, get the values from http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/gps/BlackBerryLocationProvider...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500

Re: MapView and set the location

[ Edited ]

I like to open the map once user click on a button then get the location detail from it. Once user click on location then pop that screen.

 

Can you give the link for it to open the map.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: MapView and set the location

for that you would need to use the newer MapView i think, maybe http://www.blackberry.com/developers/docs/7.1.0api/net/rim/device/api/lbs/maps/ui/MapField.html#getS...
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500

Re: MapView and set the location

i liked your anwer but i want to this from 4.7+. How can i achieve in this.

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: MapView and set the location

the old map view does not offer this functionality, so i don't know how you could do it, not my area of expertise unfortunately.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
ajaysainsgvu
Posts: 242
Registered: ‎02-19-2013
My Device: 9500

Re: MapView and set the location

Can you tell me I am using the mapfield but when i want to drag to different location using finger gesture then its not moving and zooming also.