I use ol3-google-maps and when I switch layer from standard OSM to Google then styles are broken. I have defined styles but Google use self for example: points in OSM are yellow but when is google-map point shows like Google marker.
Google layers:
var GM = new olgm.layer.Google({
mapTypeId: 'hybrid',
title: 'Google',
type: 'base'
});
var olGM = new olgm.OLGoogleMaps({map: map,mapIconOptions: {useCanvas: true }});
olGM.activate();
manager['main_google'].setVisible(false);
Style:
function pointStyleFunction(feature) {
return new ol.style.Style({
fill: new ol.style.Fill({
color: 'rgba(255, 255, 255, 0.2)'
}),
stroke: new ol.style.Stroke({
color: '#ffcc33',
width: 2
}),
image: new ol.style.Circle({
radius: 7,
fill: new ol.style.Fill({
color: '#ffcc33'
})
}),
text: createTextStyle(feature)
});
}
Layers of features:
var layer_ambon = new ol.layer.Vector({
source: new ol.source.Vector({ features: new ol.Collection((new ol.format.GeoJSON()).readFeatures(map_info['layers'][3])) })
});
Standard OL map:
map = new ol.Map({
interactions: olgm.interaction.defaults(),
target: olMapDiv,
layers: [
OSM,
GM,
],
controls: ol.control.defaults().extend([
new ol.control.ScaleLine()
]),
view: view
});