@siteone/vanilla-maps
v2.1.15
Published
1. Bundles in assets are version that are guaranteed to work with our tiles
Downloads
6
Keywords
Readme
This set of scripts is intended to use leaflet in vanilla JS (without React)
- Bundles in assets are version that are guaranteed to work with our tiles
assets/css/XXX/bundle.css
assets/js/XXX/bundle.min.js
The XXX
is the leaflet version.
- File
map.js
is only wrapper to provide neat API for our customers.
Example
<link href='https://unpkg.com/@siteone/[email protected]/assets/css/1.4.0/bundle.css' rel='stylesheet' />
<script src='https://unpkg.com/@siteone/[email protected]/assets/js/1.4.0/bundle.min.js'></script>
<script src='https://unpkg.com/@siteone/[email protected]/map.js'></script>
/* You can override map styles (optional) */
<style>
.mapsOneIcon {
...
}
.mapsOneIcon.red {
...
}
</style>
<script type='text/javascript'>
var map = new SiteMap('mapone', {
tileUrl: "http://abcde/{z}/{x}/{y}.png?moKey=9752e2e42fd67d8db23f7877df986c50",
fullscreenEnabled: true,
clusteringEnabled: true,
})
map.addMarker({ lat: 50.061, lng: 14.465 }, map.getIcon("red"), function () { return '<h3>' + "Název bodu 1" + '</h3><p>' + "popisek 12" + '</p>' })
</script>