2016-06-29 19 views
0

私はElectronを使ってアプリケーションを作成しています(htmlとnode.jsを含むアプリケーションを作成するGitHubの機器)。 このアプリは、インターネットに接続されていないコンピュータで使用されます。 マップを表示し、マーカーを配置する必要があります(リーフレットを見つけました)が、すべてのマップサービスにインターネットが必要です。 Open Street Maps osmファイルをエクスポートすることはできますが、それを行うノード(mapbox-gl-native-master)の唯一のライブラリにはC++ 11が必要であり、それをリーフレットにレンダリングする方法がありません。インストール中に私にエラーを与える:リーフレットの地図オフライン

$ npm install mapbox-gl-native 

> [email protected] preinstall /home/dpd-/node_modules/.staging/mapbox-gl-native-eb973ff7 
> npm install node-pre-gyp 

npm ERR! Linux 4.4.0-24-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "node-pre-gyp" 
npm ERR! node v4.2.6 
npm ERR! npm v3.5.2 

npm ERR! Cannot read property 'target' of null 
npm ERR! 
npm ERR! If you need help, you may report this error at: 
npm ERR!  <https://github.com/npm/npm/issues> 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/dpd-/node_modules/.staging/mapbox-gl-native-eb973ff7/npm-debug.log 
npm WARN enoent ENOENT: no such file or directory, open '/home /dpd-/package.json' 
npm WARN dpd- No description 
npm WARN dpd- No repository field. 
npm WARN dpd- No README data 
npm WARN dpd- No license field. 
npm ERR! Linux 4.4.0-24-generic 
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "mapbox-gl-native" 
npm ERR! node v4.2.6 
npm ERR! npm v3.5.2 
npm ERR! code ELIFECYCLE 

npm ERR! [email protected] preinstall: `npm install node-pre-gyp` 
npm ERR! Exit status 1 
npm ERR! 
npm ERR! Failed at the [email protected] preinstall script 'npm  install node-pre-gyp'. 
npm ERR! Make sure you have the latest version of node.js and npm installed. 
npm ERR! If you do, this is most likely a problem with the mapbox-gl-native package, 
npm ERR! not with npm itself. 
npm ERR! Tell the author that this fails on your system: 
npm ERR!  npm install node-pre-gyp 
npm ERR! You can get information on how to open an issue for this project with: 
npm ERR!  npm bugs mapbox-gl-native 
npm ERR! Or if that isn't available, you can get their info via: 
npm ERR!  npm owner ls mapbox-gl-native 
npm ERR! There is likely additional logging output above. 

npm ERR! Please include the following file with any support request: 
npm ERR!  /home/dpd-/npm-debug.log 
+1

オフラインで動作するWebテクノロジを使用してマップアプリケーションを作成することは自明ではありません。あなたはgis.stackexchange.comで尋ねたいかもしれません。 –

答えて

0

どちらがオフラインOSMファイルを扱うことができるよりも多くする必要があり、KothicMapnikのいずれかを見てみましょう。 Mapnikは基本的にnode.jsインターフェイスを持つC++ライブラリであるため、Kothicは実装するのが簡単です(純粋なJS)。さらに、Kothicはリーフレットとの容易な統合を主張しているので、これはあなたにはうってつけだと思います。

関連する問題