Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
mapnik-style-parser
Advanced tools
Parse JSON data to XML Mapnik Style.
Install using the NPM:
npm install -S mapnik-style-parser
A simple use case:
import StyleParser from 'mapnik-style-parser';
StyleParser.toXML({
attributes: [
{ name: 'background-color', value: 'blue' },
{ name: 'srs', value: '+init=epsg:4326' }
],
styles: [{
attributes: [{ name: 'name', value: 'My Style' }],
rules: [{
name: 'PolygonSymbolizer',
parameters: [{ name: 'fill', value: '#F2EFF9' }]
}, {
name: 'LineSymbolizer',
parameters: [
{ name: 'stroke', value: 'RGB(50%, 50%, 50%)' },
{ name: 'stroke-width', value: '0.1' }
]
}]
}],
layers: [{
attributes: [
{ name: 'name', value: 'world' },
{ name: 'srs', value: '+init=epsg:4326' }
],
styles: ['My Style'],
datasource: {
parameters: [
{ name: 'type', value: 'shape' },
{ name: 'file', value: 'path/to/shapefile.shp' }
]
}
}]
});
Will produce the XML:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE Map>
<Map background-color="blue" srs="+init=epsg:4326">
<Style name="My Style">
<Rule>
<PolygonSymbolizer>
<CssParameter name="fill">#F2EFF9</CssParameter>
</PolygonSymbolizer>
<LineSymbolizer>
<CssParameter name="stroke">RGB(50%, 50%, 50%)</CssParameter>
<CssParameter name="stroke-width">0.1</CssParameter>
</LineSymbolizer>
</Rule>
</Style>
<Layer name="world" srs="+init=epsg:4326">
<StyleName>My Style</StyleName>
<Datasource>
<Parameter name="type">shape</Parameter>
<Parameter name="file">path/to/shapefile.shp</Parameter>
</Datasource>
</Layer>
</Map>
MIT
FAQs
Parse JSON data to XML Mapnik Style.
The npm package mapnik-style-parser receives a total of 0 weekly downloads. As such, mapnik-style-parser popularity was classified as not popular.
We found that mapnik-style-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.