|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.android.map.Layer com.esri.android.map.TiledLayer com.esri.android.map.TiledServiceLayer com.esri.android.map.bing.BingMapsLayer
public class BingMapsLayer
BingMapsLayer class is used to define the Layer populated from Bing Maps that can be added to the MapView object.
BingMapsLayer allows you to work with maps from Bing Maps. Bing Maps requires a key in order to allow access to the tiles. Information on how to obtain a key can be found on this page: Getting a Bing Maps Key
The following are examples of how you can work with the BingMapsLayer class. The code will add a map with a Bing Maps Layer of Aerial style.
Java usage:
MapView mv = new MapView(this);
mv.addLayer(new BingMapsLayer(
"[your Bing Maps key]", MapStyle.Aerial));
setContentView(mv);
To initialize a Bing map in a WebMap please see the class description of the MapView
.
Nested Class Summary | |
---|---|
static class |
BingMapsLayer.MapStyle
Map styles available for the imagery: Aerial - Aerial imagery AerialWithLabels - Aerial imagery with a road overlay Road - Roads without additional imagery. |
Nested classes/interfaces inherited from class com.esri.android.map.TiledServiceLayer |
---|
TiledServiceLayer.TileInfo |
Field Summary | |
---|---|
static int |
BING_MAPS_SPATIAL_REFERENCE_WKID
The WKID of spatial reference for the Bing Maps Imagery service. |
static double |
BING_MAPS_XMAX
Maximum X coordinate in meters for the full extent of Bing Maps service. |
static double |
BING_MAPS_XMIN
Minimum X coordinate in meters for the full extent of Bing Maps service. |
static double |
BING_MAPS_YMAX
Maximum Y coordinate in meters for the full extent of Bing Maps service. |
static double |
BING_MAPS_YMIN
Minimum Y coordinate in meters for the full extent of Bing Maps service. |
static int |
initWithDpi
The DPI for Bing Maps. |
Constructor Summary | |
---|---|
BingMapsLayer(String appId,
BingMapsLayer.MapStyle mapStyle)
Creates a BingMapsLayer object from Bing Maps key and map style. |
|
BingMapsLayer(String appId,
BingMapsLayer.MapStyle mapStyle,
boolean initLayer)
Creates a BingMapsLayer object from Bing Maps key and map style. |
Method Summary | |
---|---|
String |
getAppId()
Returns the Bing Maps key. |
android.graphics.Bitmap |
getBingLogo(int width,
int height)
Returns the Bing Logo bitmap. |
String |
getCulture()
Returns the culture of the layer (format: [language]-[REGION], e.g.: en-US) see Culture Parameter |
URL |
getLogoUrl()
Returns a URL object for Bing Maps logo. |
BingMapsLayer.MapStyle |
getMapStyle()
Returns the style of the Bing Maps layer. |
String |
getMapVersion()
Returns the map version (format: v[map version], e.g.: v0). |
void |
refresh()
Fetches the information for the tiles again if any of the parameters have changed (map version, map style, culture...) and refreshes the tiles accordingly. |
void |
reinitializeLayer(String appID)
Re-initializes the layer with the given appID. |
void |
reinitializeLayer(UserCredentials usercredentials)
This method has no impact on the BingMapsLayer. |
void |
setAppId(String appId)
Sets the Bing Maps key. |
void |
setCulture(String culture)
Sets the culture of the layer (format: [language]-[REGION], e.g.: en-US) see Culture Parameter |
void |
setMapStyle(BingMapsLayer.MapStyle mapStyle)
Sets the map style of the Bing Maps layer. |
void |
setMapVersion(String mapVersion)
Sets the map version (format: v[map version], e.g.: v0). |
Methods inherited from class com.esri.android.map.TiledServiceLayer |
---|
getTileInfo, recycle |
Methods inherited from class com.esri.android.map.TiledLayer |
---|
clearTiles, getBrightness, getContrast, getCurrentLevel, getGamma, setBrightness, setContrast, setGamma |
Methods inherited from class com.esri.android.map.Layer |
---|
getCredentials, getDefaultSpatialReference, getExtent, getFullExtent, getHeight, getID, getName, getOpacity, getPopupInfo, getResolution, getSpatialReference, getTitle, getUrl, getUrlHashCode, getWidth, isInitialized, isRecycled, isVisible, isWebMapBaselayer, setName, setOnStatusChangedListener, setOpacity, setPopupInfos, setVisible |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int BING_MAPS_SPATIAL_REFERENCE_WKID
public static final double BING_MAPS_XMIN
public static final double BING_MAPS_YMIN
public static final double BING_MAPS_XMAX
public static final double BING_MAPS_YMAX
public static final int initWithDpi
Constructor Detail |
---|
public BingMapsLayer(String appId, BingMapsLayer.MapStyle mapStyle)
Creates a BingMapsLayer object from Bing Maps key and map style.
This constructor is used if you instantiate the BingMapsLayer pragmatically (see the class description for an example of this usage).
appId
- the Bing Maps key.mapStyle
- the map style. See BingMapsLayer.MapStyle
for available valuespublic BingMapsLayer(String appId, BingMapsLayer.MapStyle mapStyle, boolean initLayer)
appId
- -the Bing Maps key.mapStyle
- -the map style.initLayer
- set to true to initialize the the layer, or the layer will not initialized.Method Detail |
---|
public URL getLogoUrl()
public BingMapsLayer.MapStyle getMapStyle()
public void setMapStyle(BingMapsLayer.MapStyle mapStyle)
BingMapsLayer.MapStyle
for available values.
mapStyle
- the map style to setpublic String getMapVersion()
public void setMapVersion(String mapVersion)
mapVersion
- the map version to setpublic String getCulture()
public void setCulture(String culture)
culture
- the culture to setpublic String getAppId()
public void setAppId(String appId)
appId
- the Bing Maps key to setpublic void refresh()
public android.graphics.Bitmap getBingLogo(int width, int height)
width
- - logo width in integerheight
- - logo height in integer
public void reinitializeLayer(UserCredentials usercredentials)
reinitializeLayer(String)
instead.
reinitializeLayer
in class Layer
usercredentials
- the new credentials to try.public void reinitializeLayer(String appID)
appID
- the new appID.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |