# new GoogleMapsView(args)
GoogleMapsView is the MapsIndoors MapView for Google Maps.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
args |
Object
|
A complete list of Google Maps parameters can be found here. |
||
element |
HTMLElement
|
The HTML element in which the map will be rendered. |
||
center |
Object
|
LatLngLiteral
|
<optional> |
{lat: 0, lng: 0} | The inital geographical centerpoint of the map. |
zoom |
number
|
<optional> |
0 | The initial zoom level of the map. |
maxZoom |
number
|
<optional> |
The maximum zoom level of the map. |
|
showMapMarkers |
boolean
|
<optional> |
The visibility of Google Maps' POI markers |
Example
const mapView = new mapsindoors.mapView.GoogleMapsView(...);
const mapsIndoors = new mapsindoors.MapsIndoors({mapView: mapView})
Extends
Members
Methods
# getLabelTextSizeMultiplier() → {number}
Gets the current multiplier for label text sizes.
The current text size multiplier (1.0 = normal size)
number
# hideFeatures()
Sets visibility to none for MapboxFeatures that are passed inside the array. Applied only for MapboxV3View.
# resetLabelTextSize()
Resets the label text size to the default value (1.0 = normal size). This is a convenience method that calls setLabelTextSizeMultiplier(1.0).
Example
// Reset label text size to normal
mapView.resetLabelTextSize();
# rotate(rotation)
Adjust rotation on a vector map.
Parameters:
| Name | Type | Description |
|---|---|---|
rotation |
number
|
# set(key, value, overwriteopt)
Sets the value for the given key. If the new value is different from the old value, or if the overwrite parameter is true, the value is set and the appropriate events are emitted.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
key |
string
|
The key to set. |
||
value |
*
|
The new value. |
||
overwrite |
boolean
|
<optional> |
false | If true, the value is set even if it's the same as the old value. |
- Overrides:
# setLabelTextSizeMultiplier(multiplier)
Sets a multiplier for label text sizes across all labels.
Parameters:
| Name | Type | Description |
|---|---|---|
multiplier |
number
|
The multiplier to apply (1.0 = normal size, 2.0 = double size, etc.) |
Example
// Double the text size
mapView.setLabelTextSizeMultiplier(2.0);
// Reset to normal size
mapView.setLabelTextSizeMultiplier(1.0);
Events
# changed
This event will fire when any value is changed.
Properties:
| Name | Type | Description |
|---|---|---|
args |
Object
|
|
key |
string
|
The key of the value that has changed. |
newValue |
*
|
The new value. |
oldValue |
*
|
The old value. |
- Overrides:
Example
instance.addListener('changed', (args) => {...});