Search code examples
google-maps-api-3openlayers

openlayers turn off bird´s view


I´m using Openlayers and layer Google Satellite and I´m trying to turn off the bird´s view. I found this advice:

It looks like you will have to poke at the underlying GMap object directly - something like this should do it I think: layer.mapObject.setTilt(0) The weird thing is that my reading of the Google docs says that you have to explicitly turn it on if you want it, and OpenLayers isn't doing that, but still seems to get it.

The problem is that I´ve just started with Openlayers and javaScript. Could someone please show me this directly in the code? Mine is:

var gsat = new OpenLayers.Layer.Google(
    "Google Satellite",
    {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22});
    map.addLayer(gsat);

Solution

  • well, this seems to be working: fiddle it boils down to line of ghyb.mapObject.setTilt(0);