olwidget
olwidget copied to clipboard
Stamen maps tile set for OpenStreetMap
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.
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... :-(