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

Expose more options when initializing Google v3 Layer #1222

Open
ianmcodes opened this issue Jan 10, 2014 · 0 comments
Open

Expose more options when initializing Google v3 Layer #1222

ianmcodes opened this issue Jan 10, 2014 · 0 comments

Comments

@ianmcodes
Copy link

Currently there are very few Google specific options exposed when initializing the Google maps v3 layer. That means that implementing the kind of styles that you can see on a site like http://snazzymaps.com/, requires first initializing the Google layer then directly modifying the options on the map object.

Example:

var styles = []; // some styles for Google Maps.
var glayer = new OpenLayers.Layer.Google.v3("google",{ "type": google.maps.MapTypeId.ROADMAP, "maxZoomLevel": 18});
glayer.mapObject.setOptions({ "styles": styles });

It would be great to be able to set this in the options (along with other options that Google exposes).

One question would be how to expose the Google options without conflicting with OpenLayers options. A couple possible solutions to that would be to preface all of the Google options with "google-" or to have a "googleOptions" option that would be an object of options for Google.

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