[GIS] Removing roads from Google satellite hybrid map in OpenLayers

google mapsgoogle-maps-apijavascriptopenlayers-2

I am trying to display Google satellite map in Openlayers. So, I added Google Satellite Hybrid map. My problem is, I need to display labels(like POI, place name etc) but don't need any roads & its lables.

So, I just tried this link & I am able to get exact output like below image. In this link they are using Google Map API. So, its working fine.. But I am using Openlayers.

enter image description here

For Street map, I did using below code and working fine..

var map;
var stylez = [{
        "featureType" : "road",
        "stylers" : [{
                "visibility" : "off"
            }
        ]
    }
];

var gmap = new OpenLayers.Layer.Google("Google Streets", {
        type : 'styled'
    });

var styledMapOptions = {
    name : "Styled Map"
};

var styledMapType = new google.maps.StyledMapType(stylez, styledMapOptions);

function init() {
    map = new OpenLayers.Map('map');
    map.addLayers([gmap]);

    map.setCenter(new OpenLayers.LonLat(51.523913, 25.256328).transform(
            new OpenLayers.Projection("EPSG:4326"),
            map.getProjectionObject()), 14);

    gmap.mapObject.mapTypes.set('styled', styledMapType); //Here setting the cusom style
    gmap.mapObject.setMapTypeId('styled');

}

Best Answer

I got the solution. If you want, just do the following...

 //Styles to switch off the roads
    var stylez = [{
            "featureType" : "road",
            "stylers" : [{
                    "visibility" : "off"
                }
            ]
        }
    ];

    //Satellite
    var ghyb = new OpenLayers.Layer.Google(
            "Google Hybrid", {
            type : google.maps.MapTypeId.HYBRID,
            numZoomLevels : 22,
            visibility : false
        });
    //End

    map.addLayers([ghyb]);

    ghyb.mapObject.setOptions({
        styles : stylez
    });