|
2 | 2 |
|
3 | 3 | ## Description
|
4 | 4 |
|
5 |
| -Implements `Leaflet.js` with various options. |
| 5 | +Implements [Leaflet.js](https://leafletjs.com/) with various options. |
| 6 | + |
6 | 7 |
|
7 | 8 | ## Documentation
|
8 | 9 |
|
9 |
| -A more detailed documentation on how to use it goes here. |
| 10 | +Example usage: |
| 11 | + |
| 12 | +``` |
| 13 | + <div id="map1" style="height:400px" class="pat-leaflet" data-pat-leaflet=' |
| 14 | + { |
| 15 | + "fullscreencontrol": false, |
| 16 | + "locatecontrol": false, |
| 17 | + "zoomcontrol": true, |
| 18 | + "geosearch": true, |
| 19 | + "latitude": 47.33325135, |
| 20 | + "longitude": 9.645877746692685 |
| 21 | + }'></div> |
| 22 | +``` |
| 23 | + |
| 24 | +For more examples see the [demo page](./index.html). |
| 25 | + |
10 | 26 |
|
11 | 27 | ### Options reference
|
12 | 28 |
|
13 |
| -| Property | Default Value | Values | Type | Description | |
14 |
| -| -----------------| ------------- | ------ | ----------------- | ----------------------------- | |
15 |
| -| latitude | 0.0 | | Float | latitude of the map | |
16 |
| -| longitude | 0.0 | | Float | longitude of the map | |
17 |
| -| maxClusterRadius | 80 | | Integer | | |
18 |
| -| zoom | auto | 1 - 19 | Integer | zoom level of he map | |
19 |
| -| zoomControl | true | | Boolean | are the zoomcontols avaible | |
20 |
| -| fullscreenControl| true | | Boolean | is the fullscreencontrol avaible | |
21 |
| -| addMarker | false | | Boolean | enables adding markers | |
22 |
| -| boundsPadding | 20 | | Integer | | |
23 |
| -| autolocate | false | | Boolean | locates your location | |
24 |
| -| geosearch | false | | Boolean | search a location via osm,esri, google, bing| |
25 |
| -| geosearchProvider| openstreetmap | esri, google, bing | String | select your favorit locator| |
26 |
| -| locatecontrol | false | | Boolean | | |
27 |
| -| minimap | false | | Boolean | enables the minimap | |
28 |
| -| defaullt_map_layer | { id: "OpenStreetMap.Mapnik", options: {} } | |Dict | | |
29 |
| -| map_layers | [] | | List of Dicts | | |
30 |
| -| image_path | 'node_modules/leaflet.awesome-markers/dist/images' | | String | | |
31 |
| -| geojson_ajaxurl | | | String | | |
| 29 | +Some options resemble the options from leaflet. |
| 30 | +You might also check [their documentation](https://leafletjs.com/reference.html). |
| 31 | + |
| 32 | + |
| 33 | +| Property | Default Value | Values | Type | Description | |
| 34 | +| ------------------ | ------------- | ------ | ----------------- | ------------------------------------------------ | |
| 35 | +| latitude | 0.0 | | Float | Latitude of the map. | |
| 36 | +| longitude | 0.0 | | Float | Longitude of the map. | |
| 37 | +| boundsPadding | 20 | | Integer | Padding for map boundaries. | |
| 38 | +| useCluster | true | | Boolean | Enable/Disable the marker cluster feature. | |
| 39 | +| maxClusterRadius | 80 | | Integer | Set the marker cluster radius. | |
| 40 | +| zoom | auto | 1 - 19 | Integer | Zoom level of he map. | |
| 41 | +| zoomControl | true | | Boolean | Show zoom control buttons. | |
| 42 | +| fullscreenControl | true | | Boolean | Show the fullscreen control button. | |
| 43 | +| addMarker | false | | Boolean | Enable feature to add markers. | |
| 44 | +| locatecontrol | false | | Boolean | Adds a button to show your position on the map. | |
| 45 | +| autolocate | false | | Boolean | Automatically set map to your location. | |
| 46 | +| geosearch | false | | Boolean | Search a location via osm, esri, google or bing. | |
| 47 | +| geosearch_provider | openstreetmap | openstreetmap, esri, google, bing | String | Service for location searches. | |
| 48 | +| minimap | false | | Boolean | Enables the minimap overview map. | |
| 49 | +| defaullt_map_layer | { id: "OpenStreetMap.Mapnik", options: {} } | | Dict | Define the default map layer. | |
| 50 | +| map_layers | [] | | List of Dicts | Define the available map layers (More info in source code). | |
| 51 | +| image_path | 'node_modules/leaflet.awesome-markers/dist/images' | | String | Import path to icons. | |
| 52 | +| geojson_ajaxurl | | | String | Define a AJAX endpoint for geojson data to load (More info in source code. | |
0 commit comments