@Override
	public boolean draw(Canvas canvas, MapView mapView, boolean shadow, long when) 
	{
		Paint p = new Paint();
		Point point_to_draw = new Point();
		//Projection projection = mapView.getProjection();
		
		//p.setColor(Color.BLUE);
		p.setARGB(255, 0, 0, 0);
		
		if(isVisible())
				if(shadow==false)
				{
					if(mFollowFix)
					{
						mapView.getController().setCenter(getMainActor().getPosition());
						//wmap.invalidate();
					}
					
					// adjust the zoom to farthest actors
					if (mAdjustFix){
						WPoint first_farthest = actors.get(getFarthestActor(FIRST_FARTHEST_ACTOR)).getPosition();
						//wmap.adjustMap(first_farthest);
						mapView.getController().zoomToSpan(
								2*Math.abs(first_farthest.getLatitudeE6() - getMainActor().getPosition().getLatitudeE6()), 
								2*Math.abs(first_farthest.getLongitudeE6() - getMainActor().getPosition().getLongitudeE6()));
						//System.out.println("mAdjust");
						//wmap.invalidate();
					}
					
					/*
					for(int i=0; i < this.getActorNumber(); i++)
					{
						//Drawable icon = actors.get(i).getMarker(0)
						//projection.toPixels(actors.get(i).getPosition(),point_to_draw);
						if(compassEnabled && i==main_actor_index){
							actors.get(i).draw(canvas, mapView, shadow, when, mAzimuth);
						}
						else{
							if(i==main_actor_index)
								actors.get(i).draw(canvas, mapView, shadow, when);
							else if(actors.get(i).isOriented())
								actors.get(i).draw(canvas, mapView, shadow, when, mAzimuth);
							else
								actors.get(i).draw(canvas, mapView, shadow, when);
							
						}
						//actors.get(i).getMarker(0)
					}
					*/
					for(int i=0; i < this.getActorNumber(); i++)
					{
						if(compassEnabled && i==0){
							actors_ordered.get(i).draw(canvas, mapView, shadow, when, mAzimuth);
						}
						else{
							if(i==main_actor_index)
							{
								actors_ordered.get(i).draw(canvas, mapView, shadow, when);
							}
							else if(actors.get(i).isOriented())
								actors_ordered.get(i).draw(canvas, mapView, shadow, when, mAzimuth);
							else
								actors_ordered.get(i).draw(canvas, mapView, shadow, when);
							
						}
					}
					
					wmap.postInvalidate();
					//wmap.postInvalidate();
				}
		return shadow;
	}