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

Stamen maps tile set for OpenStreetMap #106

Open
turukawa opened this issue May 10, 2012 · 1 comment
Open

Stamen maps tile set for OpenStreetMap #106

turukawa opened this issue May 10, 2012 · 1 comment

Comments

@turukawa
Copy link

Stamen has released three tile-sets for use with OpenStreetMap (http://maps.stamen.com/). I would love to use them with OLWidgdet but have no idea how to do so.

It would be great to have either some way of including use of a custom tile-set easily, or somewhere in the documentation which details how to do this.

@RobertoMaurizzi
Copy link

According to their example at view-source:http://maps.stamen.com/test/openlayers.html, after you load their tile.stamen.js library, OpenLayers gets a new Layer Object for their map.
You should be able to add in your django settings something like:

OLWIDGET_CUSTOM_LAYER_TYPES = {
    'stamen_toner': """OpenLayers.Layer.Stamen("toner")""",
    'stamen_terrain': """OpenLayers.Layer.Stamen("terrain")""",
    'stamen_watercolor': """OpenLayers.Layer.Stamen("watercolor")""",
}

then you'll be able to request maps of layer type "stamen_toner" instead of osm.mapnik or google.hybrid.
Please check their docs to see if there are other useful parameters to the OpenLayers.Layer.Stamen function

Roberto
P.S.
... didn't notice this was 1 year old... :-(

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

2 participants