2
$\begingroup$

I would like to animate zooming into maps in a smooth fashion while showing labels - but without them flickering or jumping:

Manipulate[
 GeoGraphics[GeoRange -> Quantity[m, "Miles"], 
  GeoCenter -> 
   Entity["City", {"Orlando", "Florida", "UnitedStates"}]], {m, 8, 
  9, .01}]

enter image description here

As you can see, the labels show discontinuous jumps, is there a way to avoid this? Here's an example (from Apple Maps) that show the desired behavior, by smoothly animating the labels in and out of view during zoom:

enter image description here

In the comments @jose pointed out that the follwoing looks good without the labels, but as I clarified above, I need it with labels showing:

e = Entity["City", {"CapeCanaveral", "Florida", "UnitedStates"}];
Manipulate[
 GraphicsRow[{GeoGraphics[GeoRange -> Quantity[m^2, "Miles"], 
    GeoCenter -> e,
    {GeoBackground -> "StreetMapNoLabels"}
    ], GeoImage[GeoRange -> Quantity[m^2, "Miles"], GeoCenter -> e
    ]}, ImageSize -> 800], {m, .2, 20, .01}, 
 SynchronousUpdating -> False]

Original question/motivation:

I was reading this article about the SpaceX launch and wanted to recreate the smooth map zoom:

enter image description here

Also, it doesn't know where the Kennedy Space Center is (what to do when that happens?):

enter image description here

$\endgroup$
  • $\begingroup$ One thing their map doesn’t have (from this gif) are the intricate details of street level labels & such—it just uses silhouette/profiles of the land masses, no details. Seemingly you’d need to have to have the map rendered at the closest zoom’s level of detail, & then zoom in with that, to prevent the jittering of the updated details. As for labeling I would think you put weights to the more valuable labels & then scale them according to your window size for visibility. Then a higher valued label can make room for low values at closer zoom levels. $\endgroup$ – CA Trevillian Jan 23 at 1:50
  • 1
    $\begingroup$ I would suggest to try with maps with option GeoBackground->"StreetMapNoLabels", or with the pair {GeoBackground->"Satellite", GeoServer->"DigitalGlobe"}. In both cases you will get results with no labels. Also, note the entity Entity["City", {"CapeCanaveral", "Florida", "UnitedStates"}]. $\endgroup$ – jose Jan 23 at 13:48
  • $\begingroup$ @jose Thanks, I updated the question. If the natural language parse can't resolve a location, what is the smartest thing to do in general? $\endgroup$ – M.R. Jan 31 at 18:34
  • 1
    $\begingroup$ This is tricky basically because of how tileservers work - they are rasterized images at different zoom levels, so there is a switch between level-of-detail at different zoom levels. They are not typically vectorized in the way that apple maps etc is, so in my opinion this is a pretty hard thing to solve without turning to specialized GIS software like QGIS (I say this speaking from experience having built my own maps and tileset from scratch). One possible way might be to use a no-labels tileserver and then re-add the labels you want on top using GeoMarker and so on. $\endgroup$ – Carl Lange Jan 31 at 19:27
  • 1
    $\begingroup$ @CATrevillian I updated the question to show desired label behavior $\endgroup$ – M.R. Feb 4 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.