manubb / Leaflet.PixiOverlay

Bring Pixi.js power to Leaflet maps
MIT License
463 stars 85 forks source link

Polygon border/ graphics line Scaling #8

Closed vk207 closed 6 years ago

vk207 commented 6 years ago

I am drawing around 50K polygon. using graphics object. is there any oprions to scale polygon borders[line] while zoom in /out. redrawing is very bad idea in this case ;(

manubb commented 6 years ago

I understand that you would like to have line/polygon borders width independant of zoom level. Unfortunately, this is not a simple geometry transformation. You can either recompute/redraw at each zoom change (more CPU, less RAM) or cache the scene at each zoom level (less CPU, more RAM).

vk207 commented 6 years ago

I think we can change the properties of graphics data & change the dirty properties then render again. i just changed the colors of polygon in that way .... Like

item.markerSprite.dirty ++; // -- item.markerSprite.clearDirty++; //--

item.markerSprite.graphicsData.forEach(function (data) { data.fillColor = defaultDisplaySettings.AreaFillColor; data.fillAlpha = item.Transparency; });

render(container):

Am i correct

manubb commented 6 years ago

Your target is unclear to me. Can you describe precisely what you are trying to achieve? A screenshot could also help.

manubb commented 6 years ago

I will close this issue. If your problem is still unsolved, consider asking help here.