Suppose I do:

GeoGraphics[Entity["City", {"Eureka", "California", "UnitedStates"}]]

What do folks do at this point to zoom in to various parts of the image?


You'll need some sort of GeoPosition that you want to zoom in on, then you can set your range:

GeoGraphics[Entity["City", {"Eureka", "California", "UnitedStates"}], 
GeoRange -> Quantity[n, "Miles"]]

Where n is your width.

enter image description here


Here is a rough sketch of what a controller would look like:

corner1 = 
  {"Eureka", "California", "UnitedStates"}]][[1, 1]];
corner2 = 
  {"Eureka", "California", "UnitedStates"}]][[2, 1]];

 GeoGraphics[GeoPosition[{lat, lon}], GeoRange -> Quantity[zoom, "Miles"]],
 {lat, Min[corner1[[1]], corner2[[1]]], Max[corner1[[1]], corner2[[1]]]},
 {lon, Min[corner1[[2]], corner2[[2]]],Max[corner1[[2]], corner2[[2]]]},
 {zoom, 5, 1}

enter image description here

| improve this answer | |
  • $\begingroup$ How would you pick a particular GeoPosition of the city on which to zoom in on? $\endgroup$ – David Dec 1 '15 at 17:22
  • $\begingroup$ @David Check out the edit I just made, this is just using sliders- but with some effort you could most likely use a Locator control too. $\endgroup$ – Peter Roberge Dec 1 '15 at 18:19
  • $\begingroup$ Seriously beautiful answer. Absolutely amazing. Yes, I would like to see a locator example as well. $\endgroup$ – David Dec 1 '15 at 21:42

Start with

GeoGraphics[Entity["City", {"Eureka", "California", "UnitedStates"}]];

enter image description here

DoubleClick anywhere on the above image

RightClick and choose GetCoordinares

Now, as you move over the image, the coordinates are displayed as a Tooltip

LeftClick at the position you want to enlarge (in this example Indian Island)

Ctrl-Copy the coordinates

Ctr-Paste into your notebook

{GeoPosition[{40.7876, -124.17}, ITRF00]}

Transform into f.e.

GeoGraphics[GeoPosition[{40.8146, -124.169}], GeoZoomLevel -> 15]

Choose the appropriate GeoZoomLevel

enter image description here

| improve this answer | |
  • $\begingroup$ Great answer. I really learned a lot by investigating your answer. Thanks so much. $\endgroup$ – David Dec 1 '15 at 21:42

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.