getsmap / smap-responsive

A JavaScript framework for simple creation of web maps with responsive design supporting a range of different browsers and devices
GNU General Public License v3.0
15 stars 12 forks source link

WFST for Draw #100

Closed cleberar38 closed 9 years ago

cleberar38 commented 10 years ago

WFST for Draw

Create a WFST Draw tool using geoserver.

johanlahti commented 9 years ago

A beta-version of the draw tool is ready and is currently being "tested in production" by Miljöförvaltningen here in Malmö. The tool supports points, multipoints, lines, multilines, polygons and multipolygons. Mixed geometry types can also be handled but in the layer switcher you must create one layer for each geometry type (one for points, one for lines and one for polygons e.g.).

johanlahti commented 9 years ago

A first version released… awaiting the bugs (create new tickets/issues for that).

johanlahti commented 9 years ago

Adding encoding support. Some weird strings cannot be sent by WFS-T without encoding the first. For instance this one

Therefore, I added the possibility to encode some properties. These are specified in the plugin's option encodeKeys:

// options for plugin in Editor.js or in the config file

// Option 1: Specify columns/keys
encodeKeys: ["pics", "urls"]  // Values with these keys will be encoded before sent to the WFS-T service

// Option 2: No encoding at all
encodeKeys: null   // Nothing will be encoded

// Option 3: All attributes encoded
encodeKeys: "*"  // All attribute values will be encoded before send to WFS-T

All attributes which are encoded will also be decoded before visualised in the editing window so that we don't encode something already encoded, again and again.