Introduction
- We discussed in a previous article the workflow of getting offline basemap into ArcGIS Pro By TileServer GL Through Node.js https://blogs.tabaqat.net/en/getting-offline-vector-tiles-basemap-into-arcgis-pro-from-local-pmtiles-serving-pmtiles-by-tileserver-gl-on-windows-through-nodejs/ which requires Installation of Node.js to Serve PMTiles On Windows To be accessed as Vector Tiles Into ArcGIS Pro Or Maplibre.
- Through this article we will simplify serving PMTiles process by the use of Martin Server which optimizes for speed and heavy traffic, and is written in Rust which is distinguished by :
- Performance: Fast, memory-efficient, cross-language.
- Reliability: Safe by design, fewer bugs.
- Productivity: Great docs, tooling, and diagnostics.
Technical Guide
- To Serve Local PMTiles By Martin, We need to install it first from Maplibre Website https://maplibre.org/martin/installation.html By downloading Windows Version x64.

- To Serve PMTiles By Martin, We need to serve it either from CLI by running this command in CMD In martin installer folder ` martin test.pmtiles `
- Or using configuration file containing PMTiles and their Maplibre JSON styles files local paths as TileServer GL configuration in the previous article but TileServer GL reguires JSON file for configuration not yaml file.
- And this is the simplified form of Config.yaml file for Martin.

- It also contains sprites path which is a directory containing SVG files and glyghs folder which contains .ttf fonts files Unlike TileServer GL which is configured by sprite.json, sprite.png, sprite@2x.json and sprite@2x.png for Sprites and .PBF fonts files for glyghs or fonts not .ttf files.

- To download .ttf fonts files locally on your machine, you can clone it from google fonts (e.g. noto-fonts : https://github.com/notofonts/noto-fonts.git) and copy fonts folder to your folder containing tiles and styles.

- To configure styles to be served correctly, you should ensure that they points to served tiles URL as shown below.
- Also sprites and fonts should points to served sprites and fonts URLs and ensure if you have Arabic text values in your data to use Arabic supported font like Noto Sans Arabic Bold.

- The final folder structure will be like this containing tiles, styles, sprites and fonts.

- Then, run martin by this command line in CMD in same folder ` martin --webui enable-for-all--config config.yaml `.

- It will serve all tiles, styles, sprites and fonts on server and you can ensure by opening http://localhost:3000/

- To access any tile you can type http://localhost:3000/{tile-name}/{z}/{x}/{y} in browser and you should specify values for z, x and y like 1/1/1.
- To access any Maplibre style of any tile, you can access them via this URL in browser : http://localhost:3000/style/{style-name}.

- To access any these tiles into ArcGIS Pro as offline vector tiles, you can add served styles URLs by using add data from path panel as we did with TileServer GL.

- Vector tile will appear on map even you are offline.

- Then add all your configured and served basemap styles to create a custom vector tile basemap accessible into ArcGIS Pro.

- If you want to access served styles for vector tiles into maplibre html page, you should ensure that you assigned CORS Origin in your Config.yaml file to "*" as shown below.

Conclusion
- By following the above technical guide, you have served correctly your PMTiles by Martin Server to be accessed as Offline Vector Tiles Into ArcGIS Pro And you have take the best use of martin server advantage which is fast and doesn't require any dependencies upon usage for serving PMTiles.