We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
geojson2svg
var geojson2svg = require('geojson2svg'); var converter = geojson2svg({ attributes: ['properties.foo', 'properties.bar', 'properties.baz'] }); var svgStr = converter.convert({ type: 'FeatureCollection', features: [{ type: 'Feature', geometry: {type: 'LineString', coordinates: [[0,0], [1000,1000]]}, properties: {foo: 'fooVal-1', bar: 'barVal-1', baz: 'bazVal-1'} }, { type: 'Feature', geometry: {type: 'LineString', coordinates: [[10,10], [100,100]]}, properties: {foo: 'fooVal-2', bar: 'barVal-2'} }] }); console.log(svgStr); /* output [ '<path d="M128,128 128.00638801979818,127.99361198020182" foo="fooVal-1" bar="barVal-1" baz="bazVal-1"/>', '<path d="M128.00006388019798,127.99993611980202 128.00063880197982,127.99936119802018" foo="fooVal-2" bar="barVal-2"/>' ]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
geojson2svg
The text was updated successfully, but these errors were encountered: