com.ls.widgets.map.config
Class OfflineMapConfig

java.lang.Object
  extended by com.ls.widgets.map.config.OfflineMapConfig

public class OfflineMapConfig
extends java.lang.Object


Constructor Summary
OfflineMapConfig(OfflineMapConfig config)
           
OfflineMapConfig(java.lang.String rootMapFolder, int imageWidth, int imageHeight, int tileSize, int overlap, java.lang.String imageFormat)
           
 
Method Summary
 GPSConfig getGpsConfig()
          You can use GPSConfig in order to control GPS sensor settings.
 MapGraphicsConfig getGraphicsConfig()
          You can use MapGraphicsConfig in order to configure the look of the position marker.
 java.lang.String getImageFormat()
           
 int getImageHeight()
          Returns original map image height in pixels
 Rect getImageRect()
           
 int getImageWidth()
          Returns original map image width in pixels
 java.lang.String getMapRootPath()
           
 int getMaxZoomLevelLimit()
           
 int getMinZoomLevelLimit()
           
 int getOverlap()
           
 int getTileSize()
          Returns size of a tile in pixels.
 int getTouchAreaSize()
           
 int getTrackballScrollStepX()
           
 int getTrackballScrollStepY()
           
 boolean isFlingEnabled()
           
 boolean isMapCenteringEnabled()
           
 boolean isPinchZoomEnabled()
           
 boolean isSoftwareZoomEnabled()
           
 boolean isZoomBtnsVisible()
           
 void setFlingEnabled(boolean flingEnabled)
          Controls inertial scrolling.
 void setMapCenteringEnabled(boolean enabled)
          Controls the ability to center the map.
 void setMaxZoomLevelLimit(int maxZoomLevelLimit)
          Sets max zoom level the user can zoom in to.
 void setMinZoomLevelLimit(int minZoomLevelLimit)
          Sets minimal zoom level the user can zoom out to.
 void setPinchZoomEnabled(boolean pinchZoomEnabled)
          Controls pinch zoom gesture.
 void setSoftwareZoomEnabled(boolean softwareZoomEnabled)
          Controls the ability to use software zoom if there is no zoom levels left during zooming in.
 void setTouchAreaSize(int touchAreaSize)
          Sets touch area size
 void setTrackballScrollStepX(int trackballScrollStepX)
          Set's track ball scroll step by X axis.
 void setTrackballScrollStepY(int trackballScrollStepY)
          Set's track ball scroll step by Y axis.
 void setZoomBtnsVisible(boolean zoomBtnsVisible)
          Controls standard zoom buttons visibility.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OfflineMapConfig

public OfflineMapConfig(java.lang.String rootMapFolder,
                        int imageWidth,
                        int imageHeight,
                        int tileSize,
                        int overlap,
                        java.lang.String imageFormat)

OfflineMapConfig

public OfflineMapConfig(OfflineMapConfig config)
Method Detail

getImageWidth

public int getImageWidth()
Returns original map image width in pixels

Returns:

getImageHeight

public int getImageHeight()
Returns original map image height in pixels

Returns:

getImageRect

public Rect getImageRect()

getTileSize

public int getTileSize()
Returns size of a tile in pixels.

Returns:

getOverlap

public int getOverlap()

getImageFormat

public java.lang.String getImageFormat()

isFlingEnabled

public boolean isFlingEnabled()

setFlingEnabled

public void setFlingEnabled(boolean flingEnabled)
Controls inertial scrolling.

Parameters:
flingEnabled - true to enable fling, false otherwise.

isMapCenteringEnabled

public boolean isMapCenteringEnabled()

setMapCenteringEnabled

public void setMapCenteringEnabled(boolean enabled)
Controls the ability to center the map.

Parameters:
enabled - - if set to true map will center itself if it is smaller than screen.

isPinchZoomEnabled

public boolean isPinchZoomEnabled()

setPinchZoomEnabled

public void setPinchZoomEnabled(boolean pinchZoomEnabled)
Controls pinch zoom gesture.

Parameters:
pinchZoomEnabled - - true to enable pinch zoom gesture, false otherwise.

isZoomBtnsVisible

public boolean isZoomBtnsVisible()

setZoomBtnsVisible

public void setZoomBtnsVisible(boolean zoomBtnsVisible)
Controls standard zoom buttons visibility.

Parameters:
zoomBtnsVisible - - true to make standard zoom buttons visible, false otherwise.

getTrackballScrollStepX

public int getTrackballScrollStepX()

setTrackballScrollStepX

public void setTrackballScrollStepX(int trackballScrollStepX)
Set's track ball scroll step by X axis.

Parameters:
trackballScrollStepX - scroll step in pixels.
Throws:
java.lang.IllegalArgumentException - if trackballScrollStepX < 0

getTrackballScrollStepY

public int getTrackballScrollStepY()

setTrackballScrollStepY

public void setTrackballScrollStepY(int trackballScrollStepY)
Set's track ball scroll step by Y axis.

Parameters:
trackballScrollStepY - - scroll step in pixels.
Throws:
java.lang.IllegalArgumentException - if trackballScrollStepY < 0

getMinZoomLevelLimit

public int getMinZoomLevelLimit()

setMinZoomLevelLimit

public void setMinZoomLevelLimit(int minZoomLevelLimit)
Sets minimal zoom level the user can zoom out to.

Parameters:
minZoomLevelLimit - - represents zoom level number.
Throws:
java.lang.IllegalArgumentException - if minZoomLevelLimit < 0

getMaxZoomLevelLimit

public int getMaxZoomLevelLimit()

setMaxZoomLevelLimit

public void setMaxZoomLevelLimit(int maxZoomLevelLimit)
Sets max zoom level the user can zoom in to.

Parameters:
maxZoomLevelLimit - - zoom level number.
Throws:
java.lang.IllegalArgumentException - if maxZoomLevelLimit < 0

getMapRootPath

public java.lang.String getMapRootPath()

isSoftwareZoomEnabled

public boolean isSoftwareZoomEnabled()

setSoftwareZoomEnabled

public void setSoftwareZoomEnabled(boolean softwareZoomEnabled)
Controls the ability to use software zoom if there is no zoom levels left during zooming in.

Parameters:
softwareZoomEnabled - - Set true if you want to use software zoom, false otherwise.

getTouchAreaSize

public int getTouchAreaSize()

setTouchAreaSize

public void setTouchAreaSize(int touchAreaSize)
Sets touch area size

Parameters:
touchAreaSize - - area size in pixels. Used when detecting objects that were hit by the user with a finger.
Throws:
java.lang.IllegalArgumentException - when touchAreaSize <= 0

getGpsConfig

public GPSConfig getGpsConfig()
You can use GPSConfig in order to control GPS sensor settings. Please note, that you need to configure the GPS sensor before calling MapWidget.setShowMyPosition(true);

Returns:
instance of GPSConfig class.

getGraphicsConfig

public MapGraphicsConfig getGraphicsConfig()
You can use MapGraphicsConfig in order to configure the look of the position marker.

Returns:
instance of MapGraphicsConfig