Wednesday, 3 January 2024

OSM MAP SERVER INSTALLATION VIA KITEMATIC/tileserver-gl [OFFLINE] in UBUNTU

For the OSM map installation, there are multiple ways and different procedure , the best way I would suggest is to go with the Kitematic which is the fastest and easiest way to use Docker on Mac/Windows & Linux. Also kitematic provides a graphical user interface for free. will be installation the klokantech/tileserver-gl

OSM Map is the Open free web server. Here the procedure is very simple and in details. Also you required a Kitematic Login and Password which is for free after the installation of kitematic.

The Procedure is very simple in installing the OSM MAP Server via Kitematic- klokantech/tileserver-gl [OFFLINE] in UBUNTU.

Before further Steps the Docker needs to be install then Kitematic in ubuntu so make sure the below steps are done after the successful installation of Ubuntu. 


1.      NOW In Ubuntu: - open terminal: -

a)      Type command => sudo apt update

b)     Type command => sudo apt upgrade (optional) [[ ** Mandatory if using Kitematic docker**]] 

c)      Type command => sudo apt install curl

1.      Now to install docker in Ubuntu

a)      Type Command => curl –sSL https://get.docker.com/ | sh

b)     After completion check by typing command => docker  - -version 

c)      Optional command to check docker is running or not => sudo systemctl status docker

d)     If not running type the command to run docker => sudo systemctl enable docker 

1.      For installation of  Kitematic docker follow the below procedure:-

a)      Type Command => sudo groupadd docker

b)      Type Command => sudo gpasswd -a $USER docker

c)       Type Command => newgrp docker

d)     Type Command => sudo docker run hello-world (to check if docker works perfectly or not without error)

e)     Now download Kitematic ubuntu zip file from the below link:-

https://sourceforge.net/projects/kitematic.mirror/

 


f)       Type Command => sudo apt install unzip

g)      Type Command => sudo unzip Kitematic-0.17.13-ubuntu.zip    

h)     Type Command => sudo dpkg -i Kitematic-0.17.13-amd64.deb

i)       Now the Kitematic is installed in Ubuntu>> Open Kitematic app use a login or sign up for free (it is Mandatory to login)

j)       In Kitematic app >> search bar type => tileserver-gl >> then Create “ Klokantech tileserver-gl”

k)      Now after select tileserver-gl > click settings > select volume > click change > select location Downloads or Desktop

l)       Now click Hostname/Ports > mention the localhost:3000 > save **number is user define**

 

m)    Now download the mbtiles from www.openmapstyle.org select the required country or state from the below link

https://data.maptiler.com/downloads/planet/

n)     While downloading select Downloads > click non-commercial > and download the osm mbtiles


o)     Now copy the link provided after the maptiler login

p)     In ubuntu desktop Open Terminal and copy the link => For example:- wget -c

https://data.maptiler.com/download/WyJhYzUxMjgyZC01Y2E4LTQ0NWYtOTk0MC1hYzdlNWM2MTNhYjUiLCItMSIsMTcwNTdd.ZVz4-g.HuYLll9kvbXy3cKbf72VY0_tOXk/maptiler-osm-2020-02-10-v3.11-asia_india.mbtiles ?usage=non-commercial 

Note:- the Red mark words to be deleted in the terminal then click enter to download mbtiles.

q)     After downloading copy the maptiler mbtiles in the Download folder or Desktop for Kitematic.

r)      Now in Kitematic app > restart the tileserver-gl > Open Firefox browser in Ubuntu and type => localhost:3000 

s)      Now if map is working and showing the desired downloaded map.

Note:- If not working follow the below step to create config.json

t)      In Open terminal Type command => sudo apt install vim

u)     Type command => vim /Downloads/config.json

v)      Copy the below script 

Note:- In this Script change the “bounds” mentioned in the mbtiles download for selected vector tiles in OSM map [[for example:- check-in image at maptiler]]  and in “mbtiles” type the path of the downloaded mbtiles in the script

{

  "options"{

    "paths": {

      "root""/usr/src/app/node_modules/tileserver-gl-styles",

      "fonts""fonts",

      "styles""styles",

      "mbtiles""/data"

    },

    "serveStaticMaps"true,

    "formatQuality": {

      "jpeg"90,

      "webp"90

    },

    "maxSize"8192,

    "pbfAlias""pbf"

  },

  "styles"{

    "klokantech-basic": {

      "style""klokantech-basic/style.json",

      "tilejson": {

        "bounds": [67.67457, 5.896067, 97.49344, 35.773]

      }

    },

    "osm-bright": {

      "style""osm-bright/style.json",

      "tilejson": {

        "bounds": [67.67457, 5.896067, 97.49344, 35.773]

      }

    }

  },

  "data"{

    "v3": {

   "mbtiles""/Downloads/maptiler-osm-2020-02-10-v3.11_asia_india.mbtiles"

    }

  }

}

Now save the config.json script then restart the Kitematic and restart the tileserver-gl via Kitematic 3 to four times and bingo it works....


OSM MAP SERVER INSTALLATION VIA KITEMATIC/tileserver-gl [OFFLINE] in UBUNTU

For the OSM map installation, there are multiple ways and different procedure , the best way I would suggest is to go with the Kitematic whi...