Using Chrome 44 on Mac OS.

To reproduce:
- click "Add an area"
- zoom in to max zoom
- select geometry type of polygon
- draw a polygon on the map
- zoom out
- observe the polygon not where you originally drew it

Comments

R.J. Steinert created an issue. See original summary.

m.stenta’s picture

Project: farmOS » Farm Area

Ah good catch. Sounds like a map projection issue... :-/

Thanks for the bug report!

Moving this to Farm Area module...

m.stenta’s picture

Hm, actually... might have more to do with the available zoom levels of Google Maps. I took a look at your rj.farmos.net site - and I think I see what you mean. I'll run some tests and see if I can nail it down...

m.stenta’s picture

Yikes, it gets even weirder if you pan the map around after creating a shape like this. It's all of a sudden disconnected from the map, and pans at a multiplied rate!

m.stenta’s picture

It only seems to happen in certain places too... not everywhere.

m.stenta’s picture

Status: Active » Closed (fixed)

I figured out why this was happening: the Google Maps API does not allow you to zoom past a certain level. This makes sense, they only have imagery for certain zoom levels. Unfortunately, if you ask the API for tiles at a higher zoom level, it doesn't return empty tiles as you might expect - instead it returns the same map tiles as before (at the max zoom level). So the Google Maps tiles make it LOOK like you're only zoomed into 20, but everything else in Openlayers is actually zoomed to 24 (for example).

I put a rough fix into place a while back and forgot to update this issue. My rough fix was to simply not allow the map to be zoomed more than 20 (it seems like that is the max for most of Google Maps).

Now, I want to be able to zoom farther than that, so I created a new feature request: #2680273: Allow zooming past Google Map limit

Closing this as "fixed".

m.stenta’s picture

Project: Farm Area » farmOS

Moving old issues to the canonical farmOS project for easier searching. Apologies for email spam if anyone is following these. :-)