Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - [solved]how to add a new overlay to mapview

[solved]how to add a new overlay to mapview

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

[solved]how to add a new overlay to mapview

Postby zhanglibo0626 » Sun Dec 28, 2008 3:48 pm

hello everybody.
I am a freshman, my question is how to add a new overlay to mapview? I used several ways, but all failed.

way one:
Overlay OL = new Overlayer(); //error, Cannot instantiate the type Overlay
OL.toTop(p, myMapView);
myMapView.getOverlays().add(OL);

way two:
Drawable myIcon = getResources().getDrawable(R.drawable.icon);
ScaleDrawable myicon = new ScaleDrawable(myIcon, 0, 500, 500);
myMapView.getOverlays().add(new ItemizedOverlay((Drawable)myicon)); //error, Cannot instantiate the type ItemizedOverlay


thx for your help.
waiting.....................
Last edited by zhanglibo0626 on Tue Dec 30, 2008 3:50 pm, edited 1 time in total.
zhanglibo0626
Freshman
Freshman
 
Posts: 3
Joined: Sat Dec 27, 2008 12:00 pm

Top

Postby ndroid » Tue Dec 30, 2008 6:41 am

Have a class that extends Overlay like
protected class MyLocationOverlay extends Overlay {
public MyLocationOverlay(Context context, MapView mapView)
{

}
draw()
{
// override the draw function..
}
}
and the you get the list of overlays from the map and add your overlay to that list..
ndroid
Junior Developer
Junior Developer
 
Posts: 15
Joined: Mon Dec 15, 2008 1:29 pm

Postby zhanglibo0626 » Tue Dec 30, 2008 9:34 am

thx, I get

ndroid wrote:Have a class that extends Overlay like
protected class MyLocationOverlay extends Overlay {
public MyLocationOverlay(Context context, MapView mapView)
{

}
draw()
{
// override the draw function..
}
}
and the you get the list of overlays from the map and add your overlay to that list..
zhanglibo0626
Freshman
Freshman
 
Posts: 3
Joined: Sat Dec 27, 2008 12:00 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: Google [Bot] and 5 guests