osmtogeojson
Advanced tools
Comparing version 1.0.0 to 1.1.0
@@ -10,3 +10,5 @@ try { | ||
var result; | ||
if ( data instanceof XMLDocument ) | ||
console.log(data.childNodes[0].tagName); | ||
if ( ((typeof XMLDocument !== "undefined") && data instanceof XMLDocument || | ||
(typeof XMLDocument === "undefined") && data.childNodes) ) | ||
result = _osmXML2geoJSON(data); | ||
@@ -13,0 +15,0 @@ else |
{ | ||
"name": "osmtogeojson", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "convert OSM to geojson", | ||
@@ -9,2 +9,5 @@ "main": "osmtogeojson.js", | ||
}, | ||
"bin": { | ||
"osmtogeojson": "osmtogeojson" | ||
}, | ||
"repository": { | ||
@@ -24,3 +27,5 @@ "type": "git", | ||
"dependencies": { | ||
"lodash": "~2.2.0" | ||
"lodash": "~2.2.0", | ||
"xmldom": "~0.1.16", | ||
"optimist": "~0.3.5" | ||
}, | ||
@@ -27,0 +32,0 @@ "devDependencies": { |
@@ -17,13 +17,18 @@ osmtogeojson | ||
nodejs: | ||
npm install osmtogeojson | ||
var osm = require('osmtogeojson'); | ||
osm.toGeojson(xml_data); | ||
browser: | ||
<script src='osmtogeojson.js'></script> | ||
osmtogeojson.toGeojson(xml_data); | ||
* as a command line tool: | ||
npm install -g osmtogeojson | ||
$ osmtogeojson file.osm > file.geojson | ||
* as a nodejs libary: | ||
npm install osmtogeojson | ||
var osm = require('osmtogeojson'); | ||
osm.toGeojson(xml_data); | ||
* as a browser library: | ||
<script src='osmtogeojson.js'></script> | ||
osmtogeojson.toGeojson(xml_data); |
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
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
49189
7
1631
34
3
+ Addedoptimist@~0.3.5
+ Addedxmldom@~0.1.16
+ Addedoptimist@0.3.7(transitive)
+ Addedwordwrap@0.0.3(transitive)
+ Addedxmldom@0.1.31(transitive)