Tuesday, April 5, 2016

PGRestAPI tessera tileserver

(((((((((((((( tessera tessera tessera tessera ))))))))))))))))))))))))))))




--------------------------------------

任何一个地方,-g meas global install,

npm install -g tessera
npm install -g mbtiles


安装地点不在上面那个地方,而是统一在

C:\Users\HU_J\AppData\Roaming\npm


现在去那个地方,

cd  C:\Users\HU_J\AppData\Roaming\npm

在那里必须按装这两个 东西,否则不能用,

npm install tilelive-mapbox tilelive-xray

安装完成,开始使用


去到有mbtiles文件的地方
cd C:\joe_hu\data_history\vector_tiles


tessera mbtiles://./City_Parcels.mbtiles




然后去

http://localhost:8080/ 就可以看到。

注意,mbtiles 是vector tile, 但是网页得到的是 png raster

=======================================================


另外一个方法是:

找一个地方,
npm install tessera tilelive-mapbox tilelive-xray


cd C:\jh1\tessera\node_modules\.bin

tessera mapbox:///mapbox.mapbox-streets-v5







(((((((((((((((((( END ((((((( tessera tessera tessera tessera ))))))))))))))))))))))))))))





(((((((((((((((((((((((((((((((((((((((((PGRestAPI PGRestAPI PGRestAPI))))))))))

MS build error, is because of missing visual studio c++ build tool

1) solution is install visual studio c++ express 2010 ( must install first and try)

2) if still has build error, read error message, if error says can't find ".......MSBuild/v140/...."
    v140 means visual studio c++ 2015,  you need to install it.

    if error says.... /v120/  means missing visual studio c++ 2013,,,,,
        v110 = 2012

v100= 2010


**************   If above still does not work, try below  ********************

I have both Visual Studio Express 2013 and Visual Studio Community 2015 installed.
I was getting  C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.Cpp.Platform.targets(64,5): error MSB8020: The build tools for v140 (Platform Toolset = 'v140') cannot be found. To build using the v140 build tools, please install v140 build tools. Alternatively, you may upgrade to the current Visual Studio tools by selecting the Project menu or right-click the solution, and then selecting "Upgrade Solution...". [G:\work\cinema\node_modules\engine.io\node_modules\bufferutil\build\bufferutil.vcxproj]
The reason was that the latest Node.js for Windows downloaded from https://nodejs.org contains an old npm v2 (and old node-gyp inside that npm v2).
I had to update Node.js'es internal npm (which also updated node-gyp):
(open console as an administrator)
cd "C:\Program Files\nodejs"
npm install npm@latest

npm config set msvs_version 2013
Now it works (seems that it's using VS 2013 for the time being)





--------------------------------------------------------------------------------

install mapnik on windows, otherwise,   run 'node app.js'  will get error saying can't find mapnik.


Before install mapnik, must install python 2.7.10 32bit X86 version,
Must set all path to this 32 bit of python.

python27 64bit Does not work.


((((((((((((((((((((((((END((((((((((((PGRestAPI PGRestAPI PGRestAPI))))))))))





No comments: