Skip to content

Need to add set style feature to Google Layer #1522

@balab2020

Description

@balab2020

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');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions