node-red-contrib-snap4city-user
Version:
Nodes for Snap4city project, targeted to standard user (no developer)
69 lines (57 loc) • 2.38 kB
HTML
<!--/* NODE-RED-CONTRIB-SNAP4CITY-USER
Copyright (C) 2018 DISIT Lab http://www.disit.org - University of Florence
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */-->
<script type="text/x-red" data-template-name="geojson-to-wkt">
<div class="form-row">
<label for="node-input-geojson">geojson</label>
<textarea id="node-input-geojson" style="height: 250px; min-height:250px; width: 100%; max-width: none" autocomplete="off" placeholder="geojson"></textarea>
</div>
</script>
<script type="text/x-red" data-help-name="geojson-to-wkt"">
<p> Convert a GeoJson to WKT format</p>
<h3>Inputs</h3>
A JSON with these parameters:
<dl class="message-properties">
<dt>geojson
<span class="property-type">string</span>
</dt>
<dd>The GeoJson to be converted.</dd>
</dl>
<h3>Outputs</h3>
<dl class="message-properties">
<dd> WKT format result</dd>
</dl>
<h3>Details</h3>
<p>The node can receive a JSON with the parameters described in the Inputs section and with them generate the output.
If the values are not present in the input JSON, these are read by those in the configuration. If they are not present
in either part, an error is generated for the necessary parameters.</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('geojson-to-wkt', {
category: 'S4CUtility',
color: '#E9967A',
defaults: {
name: {
value: ""
},
geojson: {
value: ""
},
},
outputs: 1,
inputs: 1,
icon: "service-center.png",
label: function () {
return this.name || "geojson-to-wkt";
}
});
</script>