Android SDK change log from version 2.0.1 to version 2.1.0

SKAnnotation class

New methods:

/**
* Gets the text that is displayed with the annotation
* @return
*/
public SKAnnotationText getText()

/**
* Sets the text that is displayed with the annotation
* @param text
*/
public void setText(SKAnnotationText text)
		
/**
* Gets the view or drawable resource that is rendered with this annotation
* @return
*/
public SKAnnotationView getAnnotationView()

/**
* Sets the view or drawable resource to be rendered with this annotation
* @param annotationView
*/
public void setAnnotationView(SKAnnotationView annotationView)

SKMapCustomPOI class

Removed methods:

/**
* Returs the minimum zoom level on which the POI should be visible.
* @return the minimum zoom level on which the POI should be visible.
*/
public int getZoomLevel()

/**
* Sets the minimum zoom level on which the POI should be visible.
* @param zoomLevel new zoom level on which the POI should be visible.
*/
public void setZoomLevel(int zoomLevel)

New class SKAnnotationView

Class that specifies the source of a bitmap to be rendered with an annotation. The source can be either a view or a a drawable resource (specified with its identifier).

New class SKAnnotationText

Class that specifies the text (as well as the text attributes) that can be rendered with an annotation.

SKMapSettings class

  • Removed constants: MAP_DISPLAY_2D and MAP_DISPLAY_3D.
  • New enum SKMapDisplayMode with constants: MODE_2D(0), MODE_3D(1);
  • Removed constants:
    • MAP_FOLLOWER_MODE_NAVIGATION,
    • MAP_FOLLOWER_MODE_NONE,
    • MAP_FOLLOWER_MODE_NONE_MATCHED,
    • MAP_FOLLOWER_MODE_NONE_PLUS_HEADING_TRIANGLE,
    • MAP_FOLLOWER_MODE_POSTION,
    • MAP_FOLLOWER_MODE_POSITION_PLUS_HEADING,
    • MAP_FOLLOWER_MODE_POSITION_PLUS_TRIANGLE
  • New SKMapFollowerMode with constants: NONE(0), POSITION(1), POSITION_PLUS_HEADING(2), NAVIGATION(3).
  • Fields and corresponding getters and setters updated:
    • followerMode has SKMapFollowerMode type, instead of byte
    • mapDisplayMode has SKMapDisplayMode type, instead of byte
  • New field: orientationIndicatorType of type SKOrientationIndicatorType and corresponding getters and setters

SKMapSurfaceListener interface

New methods:

/**
* Notifies when the region of the map will begin changing. During one
* panning/zooming, this method is called once, at the beginning.
* @param mapRegion the current visible map region.
*/
void onMapRegionChangeStarted(SKCoordinateRegion mapRegion);

/**
* Notifies when the region of the map finished changing. During one
* panning/zooming, this method is called once, at the end.
* @param mapRegion the final visible map region.
*/
void onMapRegionChangeEnded(SKCoordinateRegion mapRegion);

/**
* Notifies when a request to render a map region to a file has been
* completed
* @param requestId the request's id
*/
void onOffportRequestCompleted(int requestId);

Changed methods:

Before:

void onMapRegionChanged(SKCoordinate coordinate);
void onAnimationsFinished();

After:

void onMapRegionChanged(SKCoordinateRegion mapVisibleRegion);
void onAnimationsFinished(SKAnimationType animationType, boolean inertial);

SKMapSurfaceView class

  • Removed constant ZOOM_LEVEL_INDEPENDENT_MARKERS
  • Removed constants: ORIENTATION_PORTRAIT_NORMAL = 0, ORIENTATION_LANDSCAPE_NORMAL = 1, ORIENTATION_PORTRAIT_UPSIDEDOWN = 2, ORIENTATION_LANDSCAPE_UPSIDEDOWN = 3
  • Removed SKHeadingTriangle enum
  • New constants: ORIENTATION_UNKNOWN = 0, ORIENTATION_PORTRAIT = 1, ORIENTATION_LANDSCAPE_RIGHT = 2, ORIENTATION_PORTRAIT_UPSIDEDOWN = 3, ORIENTATION_LANDSCAPE_LEFT = 4
  • New enum SKOrientationIndicatorType with constants: NONE(0), DEFAULT(1), CUSTOM_IMAGE(2)
  • New enum SKAnimationType with constants: POSITION(1), ZOOM(2), ANGLE(4)
  • New enum SKAnimationNotificationType with constants: DISABLED(0), ONCE(1), ALWAYS(2)
  • New enum SKDrawingOrder with constants DRAWABLE_OBJECTS, CUSTOM_POIS, TOTAL

New methods:

/**
* Returns the current map visible region.
* @return
*/
public SKCoordinateRegion getCurrentMapRegion()

/**
* Sets the map in navigation mode.
* @param inNavigationMode
*/
public void setInNavigationMode(boolean inNavigationMode)

/**
* Disables the
* { @link SKMapSurfaceListener#onAnimationsFinished(SKAnimationType, boolean) }
* notification for the current animation type. After the animation finishes
* it will switch back to always notify.
* @param animationType
*/
public void setAnimationNotification(SKAnimationType animationType, SKAnimationNotificationType notificationType)

/**
* Animates the zooming of the map to a certain zoom level.
* @param zoom the zoom level the map will animate to.
*/
public void animateToZoomLevel(float zoom)

/**
* Gets closest custom POI from point(screenX, screenY) - using pixel
* distance
* @param screenX relative to screen position
* @param screenY relative to screen position
* @param pixelDistance set the maximum distance in pixels that you want to
* use to identify custom POIs
* @return id of the POI
*/
public int getCustomPoi(double screenX, double screenY, double pixelDistance)

/**
* Brings the annotation with the given identifier to the front.
* @param id the ID of the annotation to be updated on the map
* @return true/false
*/
public boolean bringToFrontAnnotationWithID(final int id)

/**
* Renders a bitmap annotation at the specified screen position
* @param uniqueId annotation unique id
* @param bitmap bitmap to be rendered
* @param screenPoint screen position
* @param priority priority value (determines visibility in clusters)
* @param width width of the rendered image (must be a power of 2)
* @param height height of the rendered image (must be a power of 2)
* @param xPixel x coordinate of the center point of the image
* @param yPixel y coordinate of the center point of the image
* @param zoom minimum zoom level
* @param clusterLayerID the id of the clustering layer, higher ids are
* drawn on top
* @param annotationText annotation text
*/
public void addScreenBitmapPOI(final int uniqueId, final Bitmap bitmap, final SKScreenPoint screenPoint, final int priority, final int width, final int height, final int xPixel, final int yPixel, final int zoom, final int clusterLayerID, final SKAnnotationText annotationText)

/**
* Renders a bitmap annotation at the specified GPS position
* @param uniqueId annotation unique id
* @param bitmap bitmap to be rendered
* @param location GPS position
* @param priority priority value (determines visibility in clusters)
* @param width width of the rendered image (must be a power of 2)
* @param height height of the rendered image (must be a power of 2)
* @param xPixel x coordinate of the center point of the image
* @param yPixel y coordinate of the center point of the image
* @param zoom minimum zoom level
* @param clusterLayerID the id of the clustering layer, higher ids are
* drawn on top
* @param annotationText annotation text
*/
public void addGpsBitmapPOI(final int uniqueId, final Bitmap bitmap, final SKCoordinate location, final int priority, final int width, final int height, final int xPixel, final int yPixel, final int zoom, final int clusterLayerID, final SKAnnotationText annotationText)

/**
* Updates an existing annotation.
* @param annotation the annotation that needs to be updated.
*/
public void updateAnnotation(final SKAnnotation annotation)

/**
* Gets the bounding box with the center corresponding to the provided GPS
* position and zoom. The current map region can be accessed using
* { @link SKMapSurfaceView#getCurrentMapRegion() }.
* @param region
* @return
*/
public SKBoundingBox getBoundingBoxForRegion(final SKCoordinateRegion region)

/**
* Renders a bounding box from the map to a specified file
* @param boundingBox bounding box to render to file
* @param viewportWidth output image width
* @param viewportHeight output image height
* @param filePath path to the output file
*/
public int renderMapBoundingBoxToFile(final SKBoundingBox boundingBox, final int viewportWidth, final int viewportHeight, final String filePath)

/**
* Renders a map location to a specified file
* @param location the map location
* @param zoom zoom level
* @param angle map rotation angle (in degrees)
* @param viewportWidth output image width
* @param viewportHeight output image height
* @param filePath path to the output file
*/
public int renderMapLocationToFile(SKCoordinate location, float zoom, float angle, int viewportWidth, int viewportHeight, String filePath)

/**
* Changes the visible region for the map.
* @param newRegion new map region to which the map should move.
* @param animate if true the changing will be done with
* animation , false otherwise.
*/
public void changeMapVisibleRegion(final SKCoordinateRegion newRegion, final boolean animate)

public void setDrawingOrder(List<SKDrawingOrder> order)

public List<SKDrawingOrder> getDrawingOrder()

public int getObjectAtLocation(SKCoordinate location)  

public int getObjectAtScreenLocation(SKScreenPoint screenPoint)

Modified methods:

Before:

public void centerMapOnPosition(final double longitude, final double latitude)

After:

public void centerMapOnPosition(final SKCoordinate position)

Before:

public void centerMapOnPositionSmooth(final double longitude, final double latitude, int duration) { 

After:

public void centerMapOnPositionSmooth(final SKCoordinate position, int duration)

Before:

public void setPositionAsCurrent(double longitudeX, double latitudeY, float accuracy, boolean centerMap)

After:

public void setPositionAsCurrent(SKCoordinate gpsCorrdinates, float accuracy, boolean centerMap)

Before:

private void splitAndAddCustomPois(int[] ids, double[] mercatorXs, double[] mercatorYs, int zoomLevels[], int[] poiTypes, int[] categories)

After:

private void splitAndAddCustomPois(int[] ids, double[] mercatorXs, double[] mercatorYs, int[] poiTypes, int[] categories)

Before:

public void fitBounds(final SKBoundingBox boundingBox, final float padding) 

After:

public void fitBoundingBox(final SKBoundingBox boundingBox, final int pixelPaddingX, final int pixelPaddingY)

Removed methods:

public SKBoundingBox getBoundingBox()

SKMapViewHolder class

New method:

/**
* Returns the size in pixels attributions texts.
* @return
*/
public float getAttributionsTextSize()

SKNavigationListener interface

New method:

/**
* Called for announcing the route status.
* @param tunnelEntered
*/
void onTunnelEvent(boolean tunnelEntered);

SKNavigationState class

New methods:

/**
* Gets the highway exit number for the current advice
* @return
*/
public String getCurrentAdviceExitNumber()

/**
* Sets the highway exit number for the current advice
* @param currentAdviceExitNumber
*/
public void setCurrentAdviceExitNumber(String currentAdviceExitNumber)
	
/**
* Returns the unique identifier for the current advice.
* @return the unique identifier for the current advice.
*/
public int getAdviceID()
	
/**
* Sets the unique identifier for the current advice.
* @param adviceID new identifier for the current advice.
*/
public void setAdviceID(int adviceID)

/**
* Returns the instruction string for the current advice.
* @return the instruction string for the current advice.
*/
public String getAdviceInstruction()
	
/**
* Sets the instruction string for the current advice.
* @param adviceInstruction instruction string for the current advice.
*/
public void setAdviceInstruction(String adviceInstruction)

SKPOITrackerListener interface

Modified method

Before:

void onReceivedPOIs(final List<SKDetectedPOI> detectedPOIs)

After:

void onReceivedPOIs(SKTrackablePOIType type, final List<SKDetectedPOI> detectedPOIs)

SKPOITrackerManager class

Modified methods:

Before:

public void setTrackedPOIs(List<SKTrackablePOI> poiList)

After:

public void setTrackedPOIs(SKTrackablePOIType poiType, List<SKTrackablePOI> poiList)

Before:

public boolean addWarningRulesforPoiType(final int poiType)

After:

public boolean addWarningRulesforPoiType(SKTrackablePOIType poiType)

Before:

public void setRuleForPOIType(int poiType, SKTrackablePOIRule rule)

After:

public void setRuleForPOIType(SKTrackablePOIType poiType, SKTrackablePOIRule rule)

Before:

public SKTrackablePOIRule getRuleForPOIType(int type)

After:

public SKTrackablePOIRule getRuleForPOIType(SKTrackablePOIType poiType)

New enum SKTrackablePOIType with constants: INVALID(-1), TRAFFIC(1), SPEEDCAM(0)

SKRouteAlternativeSettings class

New methods:

/**
 * @return Returns a boolean that indicates whether to avoid walking by the
 * bicycle in bicycle routing.
 */
public boolean isBicycleWalkAvoided()

/**
 * Sets a boolean that indicates whether to avoid walking by the bicycle in
 * bicycle routing.
 */
public void setBicycleWalkAvoided(boolean bicycleWalkAvoided)

/**
 * @return Returns a boolean that indicates whether carrying the bicycle is
 * avoided.
 */
public boolean isBicycleCarryAvoided()

/**
 * Sets a boolean that indicates whether to avoid carrying the bicycle.
 * @param bicycleCarryAvoided
 */
public void setBicycleCarryAvoided(boolean bicycleCarryAvoided)

/**
 * @return Returns a boolean that indicates whether to avoid highways roads
 * when calculating the route.
 */
public boolean isHighWaysAvoided()

/**
 * Sets a boolean that indicates whether to avoid highways roads when
 * calculating the route.
 * @param highWaysAvoided
 */
public void setHighWaysAvoided(boolean highWaysAvoided)

/**
 * Sets a boolean that indicates whether to avoid toll roads when
 * calculating the route.
 * @param tollRoadsAvoided
 */
public void setTollRoadsAvoided(boolean tollRoadsAvoided)

/**
 * @return Returns a boolean that indicates whether to avoid toll roads when
 * calculating the route.
 */
public boolean isTollRoadsAvoided()

/**
 * @return Returns a boolean that indicates whether to avoid ferries when
 * calculating the route.
 */
public boolean isFerriesAvoided()

/**
 * Sets a boolean that indicates whether to avoid ferries when calculating
 * the route.
 * @param avoidFerries
 */
public void setFerriesAvoided(boolean ferriesAvoided)

/**
 * Return if road slopes are used when calculating a route.
 * @return true if road slopes are used when calculating a route, false
 * otherwise
 */
public boolean isRoadSlopesUsed()

/**
 * Set whether road slopes are used when calculating a route.
 * @param useRoadSlopes true if road slopes are used when calculating a
 * route, false otherwise
 */
public void setRoadSlopesUsed(boolean roadSlopesUsed)

SKRouteListener interface

Modified methods:

Before:

void onOnlineRouteComputationHanging()

After:

void onOnlineRouteComputationHanging(int timeSinceTheHangingBehaviorStarted)

SKRouteSettings class

New methods:

/**
 * Returns if it was set to request the list of advice for the route.
 * @return true if it was set to request the list of advice for
 * the route, false otherwise.
 */
public boolean isRequestAdvices()

/**
 * Sets whether to request the list of advice when making the route. If set
 * to true, the route can be used for turn by turn navigation and
 * { @link SKRouteManager#getAdviceList} will return valid advices. Default
 * is true.
 * @param requestAdvices
 */
public void setRequestAdvices(boolean requestAdvices)

/**
 * @return Returns a boolean that indicates whether to avoid walking by the
 * bicycle in bicycle routing.
 */
public boolean isBicycleWalkAvoided()

/**
 * Sets a boolean that indicates whether to avoid walking by the bicycle in
 * bicycle routing.
 */
public void setBicycleWalkAvoided(boolean bicycleWalkAvoided)

/**
 * @return Returns a boolean that indicates whether carrying the bicycle is
 * avoided.
 */
public boolean isBicycleCarryAvoided()

/**
 * Sets a boolean that indicates whether to avoid carrying the bicycle.
 * @param bicycleCarryAvoided
 */
public void setBicycleCarryAvoided(boolean bicycleCarryAvoided)

SKAddressSearchSettings class

New constructor:

/**
 * Creates an input object for address search.
 * @param countryCode code of the country
 * @param state name of the state
 * @param city name of the city or zip code
 * @param street name of the street
 * @param houseNumber house number
 * @param maxSearchResultsNumber maximum results number for the search
 */
public SKAddressSearchSettings(String countryCode, String state, String city, String street, String houseNumber, int maxSearchResultsNumber)

Modified constructor:

Before:

public SKAddressSearchSettings(String countryCode, String state, String city, String street, String houseNumber, int searchMode, int maxSearchResultsNumber)

After:

public SKAddressSearchSettings(String countryCode, String state, String city, String street, String houseNumber, SKSearchMode searchMode, int maxSearchResultsNumber)

Modified methods:

Before:

public int getSearchMode()

After:

public SKSearchMode getSearchMode()

Before:

public void setSearchMode(int searchMode)

After:

public void setSearchMode(SKSearchMode searchMode)

SKMultiStepSearchSettings class

Modified methods:

Before:

public String getCountryCode()

After:

public SKSearchMode getSearchMode()

Before:

public void setCountryCode(String countryCode)

After:

public void setOfflinePackageCode(String offlinePackageCode)

SKNearbySearchSettings class

Modified methods:

Before:

public void setSearchMode(int searchMode)

After:

public void setSearchMode(SKSearchMode searchMode)

Before:

public int getSearchMode()

After:

public SKSearchMode getSearchMode()

Before:

public SKPOIMainCategory[] getSearchCategories()

After:

public int[] getSearchCategories()

Before:

public void setSearchCategories(SKPOIMainCategory[] searchCategories)

After:

public void setSearchCategories(int[] searchCategories)

Added class SKOnelineSearchSettings

Stores input parameters for a “oneline” address search.

SKSearchManager class

New enum SKSearchMode with constants: OFFLINE(1), ONLINE(2)

Modified methods

Before:

public SKSearchStatus onelineSearch(String countryCode, String text, boolean online, int maxResultsNumber)

After:

public SKSearchStatus onelineSearch(SKOnelineSearchSettings searchObject))

Before:

public SKPOIMainCategory[] getSearchCategories()

After:

public int[] getSearchCategories()

SKSearchResult class

Added new constant to enum SKSearchResultType: INVALID_CODE(14)

New methods:

/**
* Returns the code of the offline package containing the map data (e.g.
* "FR", "DE", "ROCITY01", etc.). Needed when performing offline geocoding.
* @return a String containing the offline package code.
*/
public String getOfflinePackageCode()

/**
 * Sets the code of the offline package containing the map data (e.g. "FR",
 * "DE", "ROCITY01", etc.). Needed when performing offline geocoding.
 * @param offlinePackageCode
 */
public void setOfflinePackageCode(String offlinePackageCode)

SKSearchStatus enum

New constant SK_SEARCH_NO_SEARCH_REQUEST_ACCEPTED(9)

Tile package

New method:

/**
 * Retrieves text tiles for specific road tile.
 * @param id tile id
 * @param operationType (0: enumerate all tiles, 1: enumerate all tiles and
 * start downloading tiles that are not downloaded, 2: enumerate downloaded
 * tiles, 3: enumerate tiles that have not been downloaded)
 * @param versionIndex version index
 * @return path to the text tile if it exist.
 */
public String getTextTileForRoadTile(int id, SKOperationType operationType, int versionIndex)

SKTrackElement class

New constructor:

/**
 * Track element constructor
 * @param id track element id
 * @param fileId the track element's file id
 * @param name track element name
 * @param extensions track element extensions
 * @param type track element type
 * @param renderAttributes track element render attributes
 */
public SKTrackElement(int id, int fileId, String name, String extensions, SKTrackElementType type, float[] renderAttributes)

New method:

/**
 * Gets all the descendant track elements
 * @return
 */
public List<SKTrackElement> getAllDescendants()

SKTracksFile class

New constructor:

/**
 * Track file constructor
 * @param id track file id
 * @param path track file path
 * @param trackType track file type
 * @param rootTrackElement root track element in the track file
 */
public SKTracksFile(int id, String path, SKTrackType trackType, SKTrackElement rootTrackElement)

New method:

/**
 * Loads a track file from a given path
 * @param path path from where to load the track file
 * @return
 */
public static SKTracksFile loadAtPath(String path)

/**
 * Saves the track file
 * @return true if the operation succeeded
 */
public boolean save()

/**
 * Saves the track file to a give path
 * @param path path where to save the track file
 * @return true if the operation succeeded
 */
public boolean saveAtPath(String path)

/**
 * Restores the track file to its initial state
 * @return true if the operation succeeded
 */
public boolean restore()

SKTracksPoint class

New constructor:

/**
 * Track point constructor
 * @param latitude track point latitude
 * @param longitude track point longitude
 * @param elevation track point elevation
 * @param course track point course
 * @param timestamp track point timestamp
 */
public SKTracksPoint(double latitude, double longitude, double elevation, int course, String timestamp)

Util package

New method:

/**
 * Converts a given view into a bitmap
 * @param view
 * @return
 */
public static Bitmap viewToBitmap(View view)