You find a wget command on the download page to execute on the server. You can either download the file in the browser and transfer it to your server or download it directly on the server. Visit the pricing page for more information. In all other cases, you have to buy a license. #MAPTILER OPENSTREETMAP FREE#These files are free for open-source and open-data project websites, non-commercial personal projects, and evaluation and education purposes. On the download page, you can search for a region and then download the OpenStreetMap vector tiles. You have to create a free account before downloading the map data. Fortunately, we don't have to do that ourselves, and we can download preprocessed mbtiles files from The conversion from the OpenStreetMap raw data into a mbtiles file is time-consuming. MBTiles is a specification for storing arbitrary tiled map data in SQLite databases. It needs the map data stored in a mbtiles file. The data you download from the OpenStreetMap project is stored in a format that the TileServer GL cannot read. So instead, I'm downloading only the data for Andorra, a small European country between Spain and France. Unfortunately, my VPS only has a drive with 20 GB capacity, so I can't download the map data for the whole earth. The data is quite big make sure you have enough space on the disk. OpenStreetMap data is free to use, and you can download it from different locations. The drawback is that the rasterization requires more processing power on the server. This can be beneficial for mobile devices with slow CPU/GPU, where rendering data on the client is slow. Raster tiles are rendered on the server and then transferred to the client as images, usually PNG. It is also easy to provide interactivity with map features, and a user can zoom and rotate the map very easily. Yet another benefit is that the data transfer is significantly reduced because vector data is much smaller than rendered images. When using vector data, the server only sends the raw data to the client, and the client "draws" the map. The difference between raster tiles and vector tiles is the location where the map is drawn. TileServer GL Light is pure JavaScript and runs on any Node.js supported platform. #MAPTILER OPENSTREETMAP CODE#The server-side rasterization depends on native code that might not run on any platform. The server comes in two flavors, TileServer GL serves vector and raster tiles, and TileServer GL Light without the rasterization component can only serve vector tiles. TileServer GL is written in JavaScript and Node.js. #MAPTILER OPENSTREETMAP INSTALL#The tile server we will install is called tileserver-gl, an open-source tile server developed and maintained by Klokan Technologies GmbH a Swiss-based company. For the operating system, I selected Debian 11. I chose the smallest server offering: CX11 with 2GB of RAM. For this demo installation, I used a VPS server from Hetzner (referral link). In this tutorial, I will install a tile server on a VPS. If you run your own tile server, you can either host the whole planet (needs about 51 GB for the base map) or just a region or country. All you need is a server in your intranet or a server connected to the Internet and a lot of disk space. Fortunately, it is not too complicated to do that. You can use this tile server in your application, but you have to comply with the usage policy: Ī better solution is to use one of the commercial providers mentioned above or host your tile server. OpenStreetMap itself also runs a tile server () that is used for the map you find on the homepage: A tile server either serves vector tiles or pre-rendered tiles in PNG format or can support both. The server that sends the map data to a web application is called a tile server. On this wiki page, you find a list of commercial companies that provide services around OpenStreetMap data: The OpenStreetMap data is publicly available, and everyone can use it. You can choose others, like Apple Maps and Bing Maps.Īnd then, there are providers that host maps generated with data from the OpenStreetMap project. Google Maps is not the only map provider. A popular solution is Google Maps, where you get an all-in-one package, a JavaScript library, and the map data from Google. When you want to add interactive maps to your web application, you need some JavaScript and a server that hosts the map data. TileServerGL, a self-hosted map tile server with OpenStreetMap data Home | Send Feedback TileServerGL, a self-hosted map tile server with OpenStreetMap data
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |