@parsimap/leaflet-parsimap-tile
v1.0.9
Published
This project is provided a leaflet tile via parsimap tile service.
Downloads
175
Maintainers
Readme
leaflet-parsimap-tile
A plugin that provided for “leaflet” and able to the MapView to show parsimap raster tiles
Install
The package can be installed through following npm
npm install @parsimap/leaflet-parsimap-tile
or
yarn add @parsimap/leaflet-parsimap-tile
Usage
The CSS file should be placed into the HTML file header.
<link
href="https://cdn.parsimap.ir/third-party/leaflet/v1.7.1/mapbox-gl.css"
rel="stylesheet"
/>
The Parsimap tiles will be displayed if the parsiamp-tile plugin is added to the body tag and a valid PMI_MAP_TOKEN is requested to use.
import L from "leaflet";
import "leaflet-parsimap-tile"
const map = new L.Map('map', {
center: [35.7575, 51.41],
zoom: 6,
});
L.parsimapTileLayer('parsimap-streets-v11-raster', {
key: 'PMI_MAP_TOKEN',
}).addTo(map);
License
MIT © Parsimap