We just added annotations in WhirlyGlobe-Maply! Like, maybe 2 years ago. Let's just ignore the faded "Grand Opening" sign flapping in the wind and come on in, shall we?
The finger is invisible. Like in capitalism. |
They look just like you'd expect and they work well. Let's see how.
Tutorial
If we haven't reminded you enough, there's a fancy WhirlyGlobe-Maply site with some great tutorials. Two of them use annotations.
The vector selection tutorial pops up an annotation on selecting a vector and the marker selection tutorial... well see if you can guess.
Technical Details
The "new" object here is a MaplyAnnotation. It's based on the SMCalloutView by Nick Farina and exposes much of that functionality. That gives you enough control for almost all cases.
If you need something different, there's still the old MaplyViewTracker, a much lower level interface for dragging a view around the screen.
Adding annotations is easy, with the addAnnotation: method. To remove them, call removeAnnotation: or clearAnnotations to get rid of them all.
If you're messing with an annotation, say the user tapped on it and you need them to edit something, you can also freeze an annotation in place.
Next Up
We'll continue the map focus for a bit, but it's going to get much more interesting.
Also, WhirlyGlobe-Maply 2.4 is just about to release. Really.
No comments:
Post a Comment