Is using MapServer to merge several MapLayers on runtime to use with Leaflet a good idea? -


my problem

we´re doing project right have display huge image (containing chemical compounds , elements, not geo referenced) map within web-application (with leaflet). image adobe illustrator-file, bunch of vector graphics. makes things easy, converted large .png (27.000x19.000 px) , used maptiler create needed mapressources leaflet, included within tilelayer.

the problem is: user needs able dynamically add , remove different layers (== filter) of map show more or less informationes picture. first created layers within illustrator-file, exported every layer own transparent .png-file, maptiled , included own leaflet-layer.

right now, have 6 filter-layers , 2 more base layers background , overlay. means when filters activated (which default), have 8 leaflet-layers stacked on top of each other @ once. can imagine, causes performance issues in browser, since leaflet has load , render 8 layers tiles (depending on screen size 25 @ once) every zoom or drag-action. still in point not impossible bear, expecting several more filters come , therefore wanna stay scalable in future.

this means somehow have change our approach of generating layers.

my approach far

since have vector-graphics based map, thought there have better alternatives. seems have rare case of requirements, since researches ended in dead ends, since of cases cover real geographical maps, have raster map. thought somehow putting map geojson or redraw somehow directly svg, since have lots of single elements on map (> 20k), dont think perform better.

so kind of need stay bitmaps, , therfore main goal simple: wanna reduce number of layers merging tiles of activated filter 1 single .png gets delivered leaflet within 1 layer. spent hours researching, run dead ends since seems have rare case of requirements here (especially since people deal georeferenced data, not custom raster maps).

so right now, can think of 2 different options:

  1. create 1 layer every filter-combination. means have create 2^n layers, work number of filters (which increase) - therefore, prefer solution (this last case)
  2. use mapserver , somehow import layers. merge layers on runtime query (i read union layer here) , therefore deliver 1 layer leaflet.

my question

i have absolutely no experience mapserver , im therefore not sure if use-case or if capabale of doing this, , more important: if give performacne boost, since requires lot of logic serverside.

before start spending hours try out: can worked mapserver give me feedback if idea or if misunderstanding mapserver completely?

also, if has alternative or idea me, you´re more welcome share it, im grateful every input. :)

thanks in advance!

you might want @ openlayers can display mix of raster , vector layers. option might mapcache tile caching engine part of mapserver project. has ability vertical assembly of tiles. if case have 8 layers can ask mapcache stack 8 tiles single tile. can give list of layers stack , takes care of you. can mapserver. difference being mapcache lightweight apache module works tiles , little faster. mapserver cgi-bin process , work efficiently @ rendering , combining raster layers not fast mapcache simple assembly of tiles.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -