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
[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 - Draw a closed polygon witihin mapview

Draw a closed polygon witihin mapview

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

Draw a closed polygon witihin mapview

Postby dudero » Tue Jan 25, 2011 3:09 pm

Hello,
I want to display borders (based on GeoPoints) on my mapview. But as far as I know android does not support anything like "java.awt.polygon"?

My problem is that if I add new points to my polygon some edges intersect with others edges. The soloution is that I have to sort my points into the right order, but I think this is not really trivial...

At the moment I draw my polygon with following code into the draw-method of an ItemizedOverlay:
Code: Select all
public void draw(Canvas canvas, MapView mapView, boolean shadow) {
...
   for(int i = 0; i < geopoints.size(); i++){
     //If its not the last point: connect the current point with its next
     if ( i < size()-1 )
       canvas.drawLine(Point(i).x,Point(i).y, Point(i+1).x, Point(i+1),mPaint);
     //The last point will be connected to the first(0) the get a closed polygon
     else
       canvas.drawLine(Point(i).x,Point(i).y, Point(0).x, Point(0).y, mPaint);
   }
...
}



Any suggestions?


Greetz dudero
dudero
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Jan 25, 2011 1:25 pm

Top

Return to Map Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests