Currently there is a limit to how far you can zoom in on a map - which is tied to the zoom limit of Google Maps, if I remember correctly.

We need to be able to zoom in further to see individual beds, and crops within beds.

I envision that when you get to a zoom point that is beyond what Google Maps can do, it will turn off, and only the shapes will be displayed. Or, perhaps there is a freely available map layer that has tiles available at very low zoom.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

m.stenta’s picture

Status: Active » Closed (fixed)
FileSize
959 bytes

I have a very rough fix for this - which requires a patch to the Openlayers module. Patch attached.

The fix essentially detects when the Openlayers zoom level is greater than the Google Maps zoom level - because the Google Maps API will stop zooming after a certain point, but the Openlayers map will still allow it. When this happens, this patch will switch to the ROADMAP layer type.

This does NOT fix the problem entirely. Google Maps and Openlayers will still be at different zoom levels. But, for the purposes of farmOS, this helps tremendously when you are drawing new shapes. The satellite/hybrid layer will show imagery that does not match the actual zoom level of the drawings, which causes incorrect placement. At least with ROADMAP, it's only the roads and other features that will be off - instead of the actual satellite imagery. Since most drawings in farmOS are done in fields and other non-road areas, this is generally OK.

It's not a perfect fix, but it will help.

I will include this patch in the farmOS drush makefile and increase the default zoom of all farmOS maps to 24.

m.stenta’s picture

Project: Farm Map » farmOS

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