Issue
Google Maps itself can sort of Highlight areas, when you are searching for example for a city. 
Since i haven´t found very much via the search function and google....
Is there an intended way to highlight an area (circle or rectangle) on an android mapview Or do i have to go the long way of calculating the necessary size of an picture (for example circle) (which is depending on the zoomlevel) and place it as a mapoverlay, which has to be replaced, whenever the zoom-level changes?
Solution
Extend Overlay and override the draw method.
For example:
class HighlightedAreaOverlay extends Overlay {
public void draw(Canvas canvas, MapView mapv, boolean shadow){
super.draw(canvas, mapv, shadow);
// your drawing code here
}
}
Then add it to your mapView by calling mapView.getOverlays().add(new HighlightedAreaOverlay());
Answered By - MahdeTo
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.