origo-map / draw-plugin

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

Stylewindow #19

Closed jokd closed 4 years ago

jokd commented 4 years ago

Fixes #10 and probably also solves #9 Adds a new button in the toolbar to style drawn features.

When loading Origo you can supply an color array like this: var origo = Origo('index.json'); origo.on('load', function (viewer) { var draw = Draw({ buttonText: 'Rita', drawTools: { "Polygon": ["freehand"], "LineString": ["freehand"] }, palette: ['rgb(166,206,227)','rgb(31,120,180)','rgb(178,223,138)','rgb(51,160,44)','rgb(251,154,153)','rgb(227,26,28)','rgb(253,191,111)','rgb(255,127,0)','rgb(202,178,214)','rgb(106,61,154)','rgb(255,255,153)','rgb(177,89,40)'] }); viewer.addComponent(draw); });

jokd commented 4 years ago

@johnnyblasta I have added palette to the material icons svg now.

jokd commented 4 years ago

Agree font would be a nice future improvement.