origo-map / draw-plugin

Draw tool plugin for Origo
MIT License
1 stars 4 forks source link

Derives the style property from style object if not set by stylewindow #42

Open johnnyblasta opened 3 years ago

johnnyblasta commented 3 years ago

Fixes #20 Some heinous if syntax to back reverse the OpenLayers Style object to the style property used in sharemap function. Perhaps there are a better way to solve this?

jokd commented 3 years ago

LGTM

jokd commented 3 years ago

One question though, would it be possible to instead do this when using the share map function? Assuring that the stored styling is correct that is. Otherwise this works but a bit confusing if for instance we add another point symbol.

johnnyblasta commented 3 years ago

One question though, would it be possible to instead do this when using the share map function? Assuring that the stored styling is correct that is. Otherwise this works but a bit confusing if for instance we add another point symbol.

Perhaps the style should always have been set even though it was the default one. Then this way of deduce the style wouldn't be necessary.

jokd commented 3 years ago

If possible that woudl be the best. It would also be good to strip out the unnecessary parts of a features properties. Eg, a polygon still has a text property.

johnnyblasta commented 3 years ago

If possible that woudl be the best. It would also be good to strip out the unnecessary parts of a features properties. Eg, a polygon still has a text property.

Yes, unnecessary parts bloats the data and makes it larger then it has to be.