Tag Info

Hot answers tagged

6

Have you seen this issue created one the LeafLet github repo: https://github.com/Leaflet/Leaflet/issues/167 try to use addLayer(layer,true); to add a tile layer to the bottom. I'm afraid that's all there is and this second optional argument is not even documented.


2

You would first need to tweak the SpatiaLite provider by either add a OrderBy property and apply that to the relevant queries (GetGeometriesInView, ...), or update the provider to handle spatial views correctly. Then you need to apply a custom theme setting assigning the appropriate color in respect to ZOrder. Why don't you want several layers? Hth ...


2

AFAIK the label of a feature has by default the same z-index than the marker and the "correct" way to change the z-index of a marker is with the constructor option zIndexOffset or the method setZIndexOffset.


2

The best way to achieve this would be to register an event handler for the map's changelayer event. Within this event handler you can identify the layer whose visibility has changed and its current z-index, which you can then use to calculate a delta that can be used with the map's raiseLayer function - or you could just use setLayerIndex and specify n + 1 ...


1

I understood the problem wrong, tried to jsfiddle this for a change. I assume you need a workaround, hence I'm going this road. Getting this to work on jsfiddle but had to do some things differently to make it work but I see your issue now. bugreport you opened has got it right, best solution is: beforefeaturehighlighted: function(e) { if ...


1

You can trigger the render intents (select, hover, default) in the stylemap with the SelectFeature control. Here is a DEMO var hoverControl = new OpenLayers.Control.SelectFeature(     [layer],     {         hover: true,         highlightOnly: true     } ); map.addControl(hoverControl); hoverControl.activate(); UPDATE: As you can see from this question ...



Only top voted, non community-wiki answers of a minimum length are eligible