简体   繁体   English

mapnik节点模块是否可用于更高版本的节点(如4.0.0)?

[英]is mapnik node module available for higher version of node(like 4.0.0)?

Currently I am using node version 0.12.0. 目前,我正在使用节点版本0.12.0。 I wanted to switch to node version 4.0.0 but I doubt if mapnik works on higher version. 我想切换到节点版本4.0.0,但是我怀疑mapnik是否可以在更高版本上运行。 Because in documentation they have specified it only for Node v0.10.x or v0.12.x. 因为在文档中他们仅为Node v0.10.x或v0.12.x指定了它。

It does work. 确实有效。 I tested it on Ubuntu 14.04 64bit with NodeJS v4.2.6 and node-mapnik v3.4.16, these are the most current releases at this point. 我在Ubuntu 14.04 64bit上使用NodeJS v4.2.6和node-mapnik v3.4.16对其进行了测试,这些是此时的最新版本。 There are also a few discussions about NodeJS 4.x compatibility on the node-mapnik Github repository, it seems that the readme is just outdated. 在node-mapnik Github存储库上也有一些关于NodeJS 4.x兼容性的讨论,似乎自述文件已经过时了。

I ran the following script to verify: 我运行以下脚本进行验证:

var mapnik = require('mapnik');
var fs = require('fs');

mapnik.register_default_input_plugins();
var map = new mapnik.Map(800, 600);
map.loadSync("map.xml");
map.zoomAll();
map.renderFileSync("out.png");
console.log(map);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM