12

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?

Pillsy
  • 18,498
  • 2
  • 46
  • 92
David
  • 14,883
  • 4
  • 44
  • 117

2 Answers2

12

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

EDIT 1

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

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


Manipulate[
 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

Peter Roberge
  • 2,357
  • 11
  • 19
  • How would you pick a particular GeoPosition of the city on which to zoom in on? – David Dec 01 '15 at 17:22
  • @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. – Peter Roberge Dec 01 '15 at 18:19
  • Seriously beautiful answer. Absolutely amazing. Yes, I would like to see a locator example as well. – David Dec 01 '15 at 21:42
7

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

eldo
  • 67,911
  • 5
  • 60
  • 168