본문
180907(금) - Google Maps (Lite Mode)
Google Maps
Lite Mode
- serve a bitmap image of map
- called lite mode map
Overview of lite mode
- specified location and zoom level
- supports all map type
- full API 제공
- stream에 여러 map을 제공하려는 경우 or too small support meaningful interaction 일 때, useful
- cannot zoom or pan the map
Adding a lite mode map
- same classes and interface as full Google maps Android API
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:map="http://schemas.android.com/apk/res-auto"
android:name="com.google.android.gms.maps.MapFragment"
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
map:cameraZoom="13"
map:mapType="normal"
map:liteMode="true"/>
GoogleMapOptions options = new GoogleMapOptions().liteMode(true);
Intent to launch a map view or directions request
- 기본적으로 map에는 map view or directions request icon이 있다.
- disable
UiSettings.setMapToolbarEnabled(false)
- click하게 되면 기본적으로 Google Maps mobile app이 뜬다.
- override own listener 가능
GoogleMap.setOnMapClickListener()
Life cycle events
- using fully interactive mode
MapView class must all activity life cycle to corresponding methods
- using lite mode
forwarding lifecycle event is optional
・ use May Location dot을 사용하려면, need to call onResume() and onPause()
Supported API features
Functionality | |
---|---|
Map types | Supported? Yes The following map types are available via GoogleMapOptions.mapType() andGoogleMap.setMapType() : MAP_TYPE_NORMAL , MAP_TYPE_SATELLITE , MAP_TYPE_TERRAIN , MAP_TYPE_HYBRID , MAP_TYPE_NONE |
Polylines, polygons, circles | Supported? Yes The lite mode functionality for shapes matches the full API. |
Projection | Supported? Yes The lite mode functionality for Projection matches the full API. |
My Location | Supported? Yes The lite mode functionality for the My Location layer matches the full API. |
Map padding | Supported? Yes The lite mode support for map padding matches the full API. |
Info windows | Supported? Yes If you set the title() of a marker, the default info window will appear when the user taps the marker. You can show the info window programmatically by calling showInfoWindow() on the marker. You can also create custom info windows via the InfoWindowAdapter interface. |
Custom base map styles | Supported? Yes The Maps SDK for Android supports custom styling of the base map. |
Markers | Supported? Partly You can add a marker and respond to a click event. You can also add custom marker icons. It's not possible to make a marker draggable. Markers on a lite mode map are flat, and they cannot be rotated. |
Camera position, zoom, and animation | Supported? Partly You can set the camera target and zoom, but not the tilt or bearing. Zoom level is rounded to the nearest integer in lite mode. Calling Calling |
Map events | Supported? Partly Lite mode supports To disable click events on a map in lite mode, you can call For details, see the events documentation. |
Indoor maps and buildings | Supported? No Lite mode will show the same tiles as the Maps Static API. This means that if the indoor floor plan is baked into the default tile, it will appear. Otherwise, it won't. Further, you cannot change the level shown or manipulate a level picker. |
Traffic layer | Supported? No GoogleMap.setTrafficEnabled() is not supported in lite mode. |
Ground overlays | Supported? No GoogleMap.addGroundOverlay() is not supported in lite mode. |
Tile overlays | Supported? No GoogleMap.addTileOverlay() is not supported in lite mode. |
Gestures | Supported? No Lite mode does not support gestures. Enabling and disabling gestures will have no effect. |
Street View | Supported? No Street View is not supported in lite mode. |
'Mobile > Google Maps' 카테고리의 다른 글
180907(금) - Google Maps (Adding a Styled Map) (0) | 2018.09.07 |
---|---|
180907(금) - Google Maps (Launch Google Maps) (0) | 2018.09.07 |
180906(목) - Google Maps (Businesses and Other POI) (0) | 2018.09.06 |
180905(수) - Google Maps (Map Objects) (0) | 2018.09.05 |
180905(수) - Google Maps (Select Current Place) (0) | 2018.09.05 |
댓글