Name | Default | Description |
---|---|---|
|
{
position: {
latitude: 0,
longitude: 0
},
zoom: 0
} |
Gets or sets the current position of the camera. |
isAmbientEnabled: boolean; |
|
Android only: Sets the value whether ambient-mode styling should be enabled. |
isBuildingsEnabled: boolean; |
|
Gets or sets the value whether 3D buildings layer is enabled. |
isCameraAnimationEnabled: boolean; |
|
Gets or sets the value whether animate the movement of the camera. |
isIndoorEnabled: boolean; |
|
Gets or sets the value whether indoor maps are currently enabled. |
isMyLocationEnabled: boolean; |
|
Gets or sets the value whether enables or disables the my-location layer. |
isTrafficEnabled: boolean; |
|
Gets or sets the value whether the map is drawing traffic data. |
mapStyle: string; |
Gets or sets the styling of the base map. | |
|
|
Gets or sets the type of map that's currently displayed. |
maxZoomLevel: number; |
21 | Gets or sets the maximum zoom level for the current camera position. This takes into account what map type is currently being used, e.g., satellite or terrain may have a lower max zoom level than the base map tiles. |
minZoomLevel: number; |
0 | Gets or sets the minimum zoom level. This is the same for every location (unlike the maximum zoom level) but may vary between devices and map sizes. |
|
Gets a Projection object that you can use to convert between screen coordinates and latitude/longitude coordinates. | |
|
{
isCompassEnabled: false,
isIndoorLevelPickerEnabled: false,
isMapToolbarEnabled: false,
isMyLocationButtonEnabled: false,
isRotateGesturesEnabled: true,
isScrollGesturesEnabled: true,
isTiltGesturesEnabled: true,
isZoomControlsEnabled: false,
isZoomGesturesEnabled: true
} |
Gets or set the user interface settings for the map. |
Name | Data | Description |
---|---|---|
cameraIdle | ||
cameraMove | ||
cameraMoveCanceled | ||
cameraMoveStart | ||
mapReady | ||
mapTap | ||
mapLoaded | ||
mapLongTap | ||
markerTap | ||
markerDrag | ||
markerDragEnd | ||
markerDragStart | ||
circleTap | ||
polygonTap | ||
polylineTap | ||
poiTap | ||
groundOverlayTap | ||
myLocationButtonTap | ||
myLocationTap | ||
cameraIdle | ||
cameraMove | ||
cameraMoveCanceled | ||
cameraMoveStart |
<Page
xmlns="http://schemas.nativescript.org/tns.xsd"
xmlns:gmap="nativescript-google-maps">
<GridLayout>
<gmap:GoogleMap
cameraPosition="-33.852,151.211">
<gmap:Marker
position="-33.852,151.211"/>
</GoogleMap>
</GridLayout>
</Page>
<template>
<Page>
<GridLayout>
<GMap
:cameraPosition="cameraPosition">
<GMapMarker
:position="markerPosition"/>
</GMap>
</GridLayout>
</Page>
</template>
<script lang="ts">
import Vue from "nativescript-vue";
export default Vue.extend({
data() {
return {
cameraPosition: {
latitude: -33.852,
longitude: 151.211,
zoom: 18
},
markerPosition: {
latitude: -33.852,
longitude: 151.211
}
}
}
});
</script>