Wednesday, January 27, 2016

Annotations

In the spirit of map features, here's another new/old one.

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.

Thursday, January 21, 2016

Infinite Scrolling

It's been way too long since my last post. And that means I've been busy. So many things to do. So many new features.  So much Android.

Stamen Watercolor + NAIP Ortho

But let's talk maps.

The Map, It is Flat


WhirlyGlobe-Maply isn't just about the globe.  There's that second part, the "Maply" bit.  That's a flat map.  It can also be a 3D map, but no one cares, they just use the globe for that.

Lots of users do use it as a flat map, though.  Sometimes (<cough> most times </cough>) that's the best way to present geospatial information.  And most of WhirlyGlobe-Maply's favorite tricks work in 2D.  Some are exclusively 2D.

Like infinite panning.

To Pan and Pan and Pan and Pan


Sometimes you need a 2D map of the whole world.  Sometimes you need to pan past the edge of the world and keep going.  Because that's how the world is.  Or would be if you stretched it out.  Or your map is near the date line.  That happens.

The nausea means it's working

This feature is baked into the MaplyViewController.  It's the viewWrap property and it's on by default.

The implementation is harder than it looks, particularly for annotations and selection.  So bask in our glory.  Or buy a support contract.  Maybe both.

Up Next


The globe gets all the press and the pretty pictures.  So we'll talk about some more map related features, like vector tiles and marker clustering.

And soon, WhirlyGlobe-Maply 2.4.  It's basically done, I just need kick it out the door.