condense / archived-openlayers-om-components

Openlayers data entry components using Om
3 stars 1 forks source link

Provide a props function to specify a list of tiles #4

Open olivergeorge opened 9 years ago

olivergeorge commented 9 years ago

I think we can update init-map! so that a list of tiles are optionally passed in place of raster which is used to produce :layers #js [raster vectorLayer].

We could assume that tiles are provided in order and that vectorLayer is the last/top tile. e.g.

(om/build BoxMap 
  {:tiles [(ol.layer.Tile. #js {:source (ol.source.MapQuest. #js {:layer "osm"}) :minResolution: 2500})
             (ol.layer.Tile. #js {:source (ol.source.OSM.) :maxResolution: 2500})
   ...}

I'm open to ideas... alternatives:

I can't think what's good prior art for this.

olivergeorge commented 9 years ago

This might give us some examples of the common use cases we want to facilitate

http://acanimal.github.io/thebookofopenlayers3/

olivergeorge commented 9 years ago

Probably overkill but we could take a composable data structure approach.