Google Maps provides "45 Degree Imagery" in some of it's maps by default. This means that when you are zoomed in to a certain level, in certain areas, Google actually provides 4 different views of an area, from each of the cardinal dimensions (see: https://developers.google.com/maps/documentation/javascript/maptypes#45D...).

This is cool, but in the context of OpenLayers it is actually not wanted. The 45 Degree Imagery does not match up with coordinates in the same way, so displaying other layers over it can result in wrong placement of things.

This is easy to fix. We just need to add "tilt: 0" to the code that loads the map object from Google's API. One line change. I'll put together a patch...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

Status: Active » Needs review
FileSize
530 bytes

Here's a patch that fixes this. Super simple! :-)

Pol’s picture

Status: Needs review » Needs work

Hello there,

I think we should provide an option to let user customize this. I think some will find it useful.

m.stenta’s picture

Component: Documentation » Code
Status: Needs work » Needs review

I agree it might be nice to add this as a feature as well, but perhaps that should be a separate "Feature Request". This would also necessitate some kind of button or control to allow the tilt to be turned on/off, and to allow rotating.

Right now, allowing "tilt" to default to "45" is a bug that should be fixed. There is no way to turn it on/off in the map, and no way to rotate. So if you are overlaying geometry on top of a Google Map, it becomes mis-aligned if you zoom in to an area that has 45 Degree Imagery available.

I spun up a quick Feature Request for that here: #2573237: Add controls for customizing Google Maps 45 Degree Imagery

Can we commit this as a first step to fix the "bug" side of this?

m.stenta’s picture

It is worth noting that Google Maps itself (when you go to google.com/maps) does NOT show the 45 Degree Imagery (yet?). If I look at my aerial in Openlayers, I see the 45 degree imagery, but if I look at the same place at the same zoom in google.com/maps, I do not see it. So it appears that this is a brand new feature only available in the GMap API - and hasn't even been rolled out to google.com/maps yet.

The fact that Google itself isn't using the new feature yet means that we should not consider this a "feature" until we have the proper UI controls in place to use it properly.

  • Pol committed c1bbb3b on 7.x-3.x authored by m.stenta
    Issue #2573005 by m.stenta: Set Google Maps "tilt" to 0
    
Pol’s picture

Status: Needs review » Fixed

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.