- if (result.astext && result.astext.match(/POLY/) ){
- var layer = omnivore.wkt.parse(result.astext);
- layerGroup.addLayer(layer);
+ if (result.astext && result.astext.match(/(POLY)|(LINE)/) ){
+ var geojson_layer = L.geoJson(null, {
+ // http://leafletjs.com/reference.html#geojson-style
+ style: function(feature) { return { clickable: false, color: 'blue' }; }
+ });
+ omnivore.wkt.parse(result.astext,null,geojson_layer);
+ layerGroup.addLayer(geojson_layer);