Skip to content

BaseMapLocations

A component to display Basemap, locations-list and interact with each other

Props

Prop nameDescriptionTypeValuesDefault
additionalMapStylesset additional styles for map e.g. heightobject-{
height: '368px'
}
attributiondefine map attributionstring-'Source: <a href=https://openstreetmap.org/>OpenStreetMap contributors</a>'
attributionPositiondefine position of map attributionstringtopright, bottomleft, bottomright'bottomright'
clusterSizesdefine number of items for cluster sizes
structure: { medium: 5, large: 20, xlarge: 100 }
Note: properties medium, large, xlarge are mandatory
object-{
medium: 5,
large: 20,
xlarge: 100
}
copyrightdefine map copyrightstring-'<a href=http://creativecommons.org/licenses/by-sa/3.0/>CC BY-SA 3.0</a>'
icondefine html code for a custom iconstring-'<svg viewBox="0 0 70.866 70.866" xmlns="http://www.w3.org/2000/svg"><path d="m35.433 0a22.731 22.731 0 0 0-22.731 22.82 24.125 24.125 0 0 0 1.872 9.1814l19.611 38.063a1.3718 1.3718 0 0 0 2.496 0l19.611-38.063a22.249 22.249 0 0 0 1.872-9.1814 22.731 22.731 0 0 0-22.731-22.82zm0 32.858a10.216 10.216 0 1 1 10.216-10.216 10.241 10.241 0 0 1-10.216 10.216z" fill="#010101"/></svg>'
iconSizedefine icon sizenumber-32
labeldefine label for the locations-liststring-'Addresses'
locationsdefine locations
structure: [{
coordinates: [16.382782, 48.208309],
latLng: [48.208309, 16.382782],
data: [ 'University of Applied Arts', 'Oskar Kokoschka-Platz 2',
'1010 Vienna', 'Austria']
}]
Note: either coordinates or latLng is mandatory
array-[]
markerPopupsdeactivate popups for markerboolean-true
maxZoomdefine max zoom factornumber-18
optionsdefine custom options for map data
e.g. {
style: 'normal',
subdomains: ['mapsneu'],
tileMatrixSet: 'google3857',
type: 'geolandbasemap'
}

usage custom keys in url property:
https://{s}.wien.gv.at/basemap/{type}/{style}/{tileMatrixSet}/{z}/{y}/{x}.png

for more information refer to the Leaflet TileLayer documentation
object-{}
urldefine url to tileLayer servicestring-''
tileLayerServicespecify service for the tileLayerstringWMTS, TMS, WMS''WMTS'
zoomdefine initial zoom factornumber-16

Demo