How to make a map?
So I want to have a map on my website, first when I thought about this I made a google api based map which obviously requires funds and its not useful for my case, then I searched little more and came to openstreetmap, postgis extensions that allow us to export map data into it which later we will query, currently I am on debian distro,
In my head what my approach should be is:
1. download data and export it to postgres database with postgis extension enabled and indexed automatically I had this done before so I know how to do it kind of
2. I should query the data from nodejs server that I will have and send it to the frontend and render it using leaflet or open layers
So actually I did the above thing before but I found it quite difficult it was rendering map with only lines and some data was missing I think I had styling problems which might be difficult.
then I came across tile server and followed instruction on this link multiple times but i couldn't make it work https://www.linuxbabe.com/linux-server/osm-openstreetmap-tile-server-ubuntu-22-04, recently I wanted to start learning docker to try to setup it from 0 or just install ubuntu on it and try to set it up there.
So please guide me with instructions, I am 17 so I don't really have that much experience especially with maps When I first saw these open source stuff I was like this is completely new world. So any instruction and help would be appreciated thanks in advance.
Guoan Xiao (Admin)
LinuxBabe
Build Your Own OpenStreetMap Tile Server on Ubuntu 22.04
OpenStreetMap, aka OSM is a user-contributed world map. This post shows how to build your own OpenStreetMap tile server on Ubuntu 22.04.
17 Replies
I used maplibre recently and it's really good!
I will consider it
https://maplibre.org/maplibre-gl-js/docs/ u can get up and running really quick
Introduction
MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser.
if u want to customize your tilesets you can deploy your own tile server at some point, but if you just want a map for your website i would personally go for something that works out of the box.
you can always add your own tile server later if you would want to
Basically I want to be able to display roads and terrain normally, I want 2 user to be able to share their current location which will update per some seconds, also I want to add icons on the map and I want o have only one country. will MapLibre be helpful in this case?
what do you mean with 'normally'? like sattelite footage?
they have this geojson feature for adding vectors and the like on top of maps: https://maplibre.org/maplibre-gl-js/docs/examples/geojson-polygon/
Add a GeoJSON polygon - MapLibre GL JS
MapLibre GL JS is a TypeScript library that uses WebGL to render interactive maps from vector tiles in a browser.
ahh cool I will start implementing and experience it myself. Is there any library which will make implementing maplibre with solid easier?
or I have to do vanilla way?
vanilla way
but no need for a wrapper
is there any api limit?
no, maplibre is completely opensource
but idk about sattelite footage tbh
So I am meaning if 10-20 user concurently fetches the map will it work for all of them? because openstreetmap was also open source but later i found they had 1 request per second limit so I want to avoind any api limits
this
I think I should upload the map data to postgresql and then make fetch request to my nodejs server which will return images/tiles. I tried other ways but I have limits all the time.
ye mb if u need raster tilesets u might need to go that way ur right
Recursos ICGC en obert
Recursos ICGC en obert