GoogleMapOptions interface
August 29, 2018 ยท View on GitHub
let options: GoogleMapOptions = {
mapType: GoogleMapsMapTypeId.HYBRID,
controls: {
'compass': true,
'myLocationButton': true,
'myLocation': true, // (blue dot)
'indoorPicker': true,
'zoom': true, // android only
'mapToolbar': true // android only
},
gestures: {
scroll: true,
tilt: true,
zoom: true,
rotate: true
},
styles: [], // https://developers.google.com/maps/documentation/javascript/style-reference
camera: {
target: [
{lat: ...., lng: ....},
{lat: ...., lng: ....},
{lat: ...., lng: ....}
]
},
preferences: {
zoom: {
minZoom: 15,
maxZoom: 18
},
padding: {
left: 10,
top: 10,
bottom: 10,
right: 10
},
building: true
}
};
this.map = GoogleMaps.create('map_canvas', options);
Interface members
| Params | Type | Details |
|---|---|---|
| mapType | GoogleMapsMapTypeId | (optional)GoogleMapsMapTypeId |
| controls | GoogleMapControlOptions | (optional)controls |
| gestures | GoogleMapGestureOptions | (optional)gestures |
| styles | JSON Array | (optional)Check out the Google Maps page |
| camera | CameraPosition<any> | (optional)Initial camera position |
| preferences | GoogleMapPreferenceOptions | (optional)preferences |