radiant-maxar / mapcss-parse Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Example generated MapCSS:
throwWarning: tr("{0} is deprecated", "{0.tag}");
the parser code currently does not use object.assign currectly (my fault!)
it only looks at the 'type level' for merging two objects such that if there are 2 equal types (maybe building=yes, healtcare=clinic)
only the healtcare ends up in the output json.
a small adjustment to make sure we are merging distinct key value pairs (or at the 'tag level') fixes this
if a value is numeric for what should be an equals, maybe something like lanes=2, it gets interpretted as a notEqual regex type...
this is because the distinctionRegex for equals does not allow numeric values.
this needs be changed, just by plucking the numeric portion of the regex
This message gets displayed with the test message
Example:
way[type=palm] {
throwWarning: tr("{0} is deprecated", "{0.tag}");
suggestAlternative: "leaf_type";
suggestAlternative: "trees";
suggestAlternative: "species";
group: tr("deprecated tagging");
}
'type=palm' is deprecated, use 'leaf_type' or 'trees' or 'species' instead
would be nice to also be able to pull data that matches the selectors with Overpass
if config says
"primary":[{"key":"building","val":"*"}]
mapcss selector should be
node[building]
fixAdd: "key=val";
fixRemove: "key";
fixChangeKey: "old=>new";
fixDeleteObject: this; /* deletes the whole object! */
Use error code/keys to help with translation of error messages
Example * Geometries:
*[type=palm] {
throwWarning: tr("{0} is deprecated", "{0.tag}");
suggestAlternative: "leaf_type";
suggestAlternative: "trees";
suggestAlternative: "species";
group: tr("deprecated tagging");
}
Example Output:
{
"geometry": "*",
"equals": {
"type": "palm"
},
"warning": "'type=palm' is deprecated, use 'leaf_type' or 'trees' or 'species' instead"
},
Example Multiple Selectors:
node[type=palm],
way[type=palm] {
throwWarning: tr("{0} is deprecated", "{0.tag}");
suggestAlternative: "leaf_type";
suggestAlternative: "trees";
suggestAlternative: "species";
group: tr("deprecated tagging");
}
Example Output:
{
"geometry": "node",
"equals": {
"type": "palm"
},
"warning": "'type=palm' is deprecated, use 'leaf_type' or 'trees' or 'species' instead"
},
{
"geometry": "way",
"equals": {
"type": "palm"
},
"warning": "'type=palm' is deprecated, use 'leaf_type' or 'trees' or 'species' instead"
},
Example:
node[oneway],
node[bridge],
node[sidewalk],
node[footway] {
throwWarning: tr("{0}", "{0.tag}");
group: tr("tag on a node which should be used on a way");
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.