Closed dorbodwolf closed 4 years ago
sorry for disturb. I try to serve my slippy map tiles generated by running this script, but I failed to do it. I cannot understand this:
just serve your slippy map directory via HTTP , and then point any map framework to this endpoint
below are what I tried:
(base) tiandeyu@deekongone:~/robosat-taipei/robosat-hainan/tiles$ pwd /home/tiandeyu/robosat-taipei/robosat-hainan/tiles
this is my tile folders, the image format is webp, and my map.html here:
(base) tiandeyu@deekongone:~/robosat-taipei/robosat-hainan/tiles$ ls 17 maketiles.ipynb map.html raster.html (base) tiandeyu@deekongone:~/robosat-taipei/robosat-hainan/tiles$ cd 17 (base) tiandeyu@deekongone:~/robosat-taipei/robosat-hainan/tiles/17$ ls 105626 105629 105632 105635 105638 105641 105644 105647 105650 105653 105656 105659 105662 105665 105668 105671 105674 105677 105680 105683 105686 105627 105630 105633 105636 105639 105642 105645 105648 105651 105654 105657 105660 105663 105666 105669 105672 105675 105678 105681 105684 105628 105631 105634 105637 105640 105643 105646 105649 105652 105655 105658 105661 105664 105667 105670 105673 105676 105679 105682 105685 (base) tiandeyu@deekongone:~/robosat-taipei/robosat-hainan/tiles/17$ pwd /home/tiandeyu/robosat-taipei/robosat-hainan/tiles/17
open the python3 http server in port 8887 and I can check the dir and files in my browser
(base) tiandeyu@deekongone:~/robosat-taipei/robosat-hainan/tiles$ python -m http.server --bind=127.0.0.1 8887 Serving HTTP on 127.0.0.1 port 8887 (http://127.0.0.1:8887/) ... 127.0.0.1 - - [30/Nov/2019 12:55:29] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [30/Nov/2019 12:55:33] "GET /map.html HTTP/1.1" 200 - 127.0.0.1 - - [30/Nov/2019 12:55:52] "GET /raster.html HTTP/1.1" 200 - 127.0.0.1 - - [30/Nov/2019 12:56:14] "GET /18/ HTTP/1.1" 200 - 127.0.0.1 - - [30/Nov/2019 12:56:32] "GET / HTTP/1.1" 200 - 127.0.0.1 - - [30/Nov/2019 13:01:27] "GET /17/ HTTP/1.1" 200 -
Then I try to visualize the slippy map tiles with Mapbox GL JS API, but I can not find my tiles in the local address:http://127.0.0.1:8887/map.html#17 here is the contents of the map.html:
<!DOCTYPE html> <html> <head> <meta charset='utf-8' /> <title>Robosat</title> <meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' /> <script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.js'></script> <link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.45.0/mapbox-gl.css' rel='stylesheet' /> <style> body { margin:0; padding:0; } #map { position:absolute; top:0; bottom:0; width:100%; } </style> </head> <body>
sorry for disturb. I try to serve my slippy map tiles generated by running this script, but I failed to do it. I cannot understand this:
below are what I tried:
this is my tile folders, the image format is webp, and my map.html here:
open the python3 http server in port 8887 and I can check the dir and files in my browser
Then I try to visualize the slippy map tiles with Mapbox GL JS API, but I can not find my tiles in the local address:http://127.0.0.1:8887/map.html#17 here is the contents of the map.html: