Nation, it’s been a while since we last discussed MapView APIs for BlackBerry 10. This time I am back with some news on critical improvements to the APIs.
Previously, I talked about how to use the MapView APIs to embed your own layers on top of it. While that was nice and very flexible, it still required some work to get basic pins and bubbles going. In BlackBerry 10.1 we have updated the APIs to support push pins and bubbles out of the box. This means you can now use the native APIs such as GeoLocation and MapData to create and manage push pins with custom icons as well as assign a name and description to each that shows up in the bubble.
The bubbles can contain a title, a description as well as an action button. Signals are emitted when the text or the action button is tapped by the user so that applications can carry out the right action in that context. Typical actions would be to show more details about the location or starting a turn-by-turn navigation to that location. Oh and before I forget, did I mention that the title and description supports html tags? Yes it does. You can use html tags to format the text or even insert hyperlinks to open webpages.
I guess I have been saving the best for last. One feature that I am really excited about is the ability to set the MapView to follow a specific pin. This is extremely useful if you want to track friends on a map or keep the user always centered on the map. Simply update the coordinates of the followed pin and watch the map automatically move with it. A full sample app can be downloaded from here.
Finally, a big shout-out to our maps team for their hard work – the MapView now has much better performance, faster tile loading and packs the features most of us need. Let’s get to work and put some more maps in our apps. If you missed the session at BlackBerry Jam Americas 2013, please check out the content on-demand – JAM69 – Maps in your Apps.