Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need to add set style feature to Google Layer #1522

Open
balab2020 opened this issue Nov 16, 2017 · 1 comment
Open

Need to add set style feature to Google Layer #1522

balab2020 opened this issue Nov 16, 2017 · 1 comment

Comments

@balab2020
Copy link

We are trying to use Google Map custom styles feature to style the map. It is possible to have from OL google layer since it create map instance using google api.

How can I make changes and contribute here?

Code snippet on this issue.

OpenLayers.Layer.Google.prototype.setstyle = function () {
              this.type = 'styled';
              var mapStyle = [];
              var styledMapType = new window.google.maps.StyledMapType(mapStyle, { name: "styled" });
              var googleMapObj = mapLayer.mapObject;
              googleMapObj.mapTypes.set('styled', styledMapType);
              googleMapObj.setMapTypeId('styled');
}
@balab2020
Copy link
Author

Created Pull Request #1523

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant