Comparing version 0.4.8 to 0.4.9
## Changelog | ||
### 0.4.9 | ||
* Render TileJSON, Mapnik options to Mapnik XML parameters. | ||
### 0.4.8 | ||
* Updated reference.json | ||
### 0.4.7 | ||
@@ -4,0 +12,0 @@ |
@@ -81,2 +81,41 @@ var _ = require('underscore'); | ||
// Pass TileJSON and other custom parameters through to Mapnik XML. | ||
var parameters = _(m).reduce(function(memo, v, k) { | ||
if (!v && v !== 0) return memo; | ||
switch (k) { | ||
// Non URL-bound TileJSON properties. | ||
case 'bounds': | ||
case 'center': | ||
case 'minzoom': | ||
case 'maxzoom': | ||
case 'version': | ||
memo.push(' <Parameter name="' + k + '">' + v + '</Parameter>'); | ||
break; | ||
// Properties that require CDATA. | ||
case 'name': | ||
case 'description': | ||
case 'legend': | ||
case 'attribution': | ||
case 'template': | ||
memo.push(' <Parameter name="' + k + '"><![CDATA[' + v + ']]></Parameter>'); | ||
break; | ||
// Mapnik image format. | ||
case 'format': | ||
memo.push(' <Parameter name="' + k + '">' + v + '</Parameter>'); | ||
break; | ||
// Mapnik interactivity settings. | ||
case 'interactivity': | ||
memo.push(' <Parameter name="interactivity_layer">' + v.layer + '</Parameter>'); | ||
memo.push(' <Parameter name="interactivity_fields">' + v.fields + '</Parameter>'); | ||
break; | ||
} | ||
return memo; | ||
}, []); | ||
if (parameters.length) output.unshift( | ||
'<Parameters>\n' + | ||
parameters.join('\n') + | ||
'\n</Parameters>\n' | ||
); | ||
var properties = _(map_properties).map(function(v) { return ' ' + v; }).join(''); | ||
@@ -83,0 +122,0 @@ output.unshift( |
@@ -25,3 +25,3 @@ { | ||
], | ||
"version": "0.4.8", | ||
"version": "0.4.9", | ||
"licenses": [{ | ||
@@ -28,0 +28,0 @@ "type": "Apache" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
219614
53
4303