I have a zoomable map of the world with a single point on it (in reality there are multiple points from a separate resource but I have simplified it). The block is here.
When I try and zoom in it jumps to a certain scale and then usually doesn't allow any more zooming movements. I have experimented with various different values for the transition
, scale
and scaleExtent
taken from this example and this one (with the latter being very close to what I want overall) but nothing has worked. It seems to get quite close to the actual size at height/6
for minimum zoom but still behaves badly.
I suspect the main problem is with scaleExtent
. I actually want the minimum zoom to be the size of the map and so it isn't possible to pan around unless zoomed in.
The other problem is, as you can see in the bl.ock that the circle disappears when you zoom. I want the circle to maintain position and size (so it doesn't get bigger when I zoom).
Can any one help with
- The zoom problem on the map, so the map minimum zoom is the actual size map and I can zoom in to about 6x that
- Preventing the map from panning unless zoomed in
- Maintaining the size and position of the circle on the map