com.micello.mapapi.standard
Class LocationMarker

java.lang.Object
  extended by com.micello.mapapi.standard.LocationMarker
All Implemented Interfaces:
AnchoredDrawable

public class LocationMarker
extends java.lang.Object
implements AnchoredDrawable

This is a standard implementation of an AnchoredDrawable that displays a single image.


Constructor Summary
LocationMarker(MapViewRegion viewRegion, MapData mapData)
          Default Constructor
 
Method Summary
 void draw(Canvas canvas, float pixX, float pixY)
          This method renders the marker icon to the canvas with the anchor point located at the specified pixel location.
 float getMarkerOffsetX()
          This method returns the marker offset.
 float getMarkerOffsetY()
          This method returns the marker offset.
 boolean hitCheck(float hitX, float hitY, float anchorX, float anchorY, boolean executeHit)
           
 boolean isLoaded()
          This method returns true if the image is loaded.
 boolean loadImage(MicelloManager micelloManager, MapTheme mapTheme)
          This method will be called by the map rendering thread if the image is not loaded.
 void setErrorRadiusMeters(float errorMeters)
           
 void showErrorRadius(boolean showError)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocationMarker

public LocationMarker(MapViewRegion viewRegion,
                      MapData mapData)
Default Constructor

Method Detail

showErrorRadius

public void showErrorRadius(boolean showError)

setErrorRadiusMeters

public void setErrorRadiusMeters(float errorMeters)

isLoaded

public boolean isLoaded()
This method returns true if the image is loaded.

Specified by:
isLoaded in interface AnchoredDrawable
Returns:
This method returns true if the image is loaded.

loadImage

public boolean loadImage(MicelloManager micelloManager,
                         MapTheme mapTheme)
This method will be called by the map rendering thread if the image is not loaded.

Specified by:
loadImage in interface AnchoredDrawable
mapTheme - Them active map theme.
Returns:
This method returns true if the image is loaded.

draw

public void draw(Canvas canvas,
                 float pixX,
                 float pixY)
This method renders the marker icon to the canvas with the anchor point located at the specified pixel location.

Specified by:
draw in interface AnchoredDrawable

getMarkerOffsetX

public float getMarkerOffsetX()
This method returns the marker offset. The marker offset is the location where a marker is placed on top of this marker.

Specified by:
getMarkerOffsetX in interface AnchoredDrawable
Returns:
Pixel offset from anchor point at which to place a marker

getMarkerOffsetY

public float getMarkerOffsetY()
This method returns the marker offset. The marker offset is the location where a marker is placed on top of this marker.

Specified by:
getMarkerOffsetY in interface AnchoredDrawable
Returns:
Pixel offset from anchor point at which to place a marker

hitCheck

public boolean hitCheck(float hitX,
                        float hitY,
                        float anchorX,
                        float anchorY,
                        boolean executeHit)
Specified by:
hitCheck in interface AnchoredDrawable
Parameters:
hitX - Pixel coordinate of hit
hitY - Pixel coordinate of hit
anchorX - Pixel coordinate at which object is anchored
anchorY - Pixel coordinate at which object is anchored
executeHit - If this is true, any actions associated with the hit are executed.
Returns:
true if object hit