java - Mapsforge image overlay android -
java - Mapsforge image overlay android -
how alter circle overlay image instead?
here's code mainactivity extends mapactivity code circle overlay:
listoverlay listoverlay = new listoverlay(); list<overlayitem> overlayitems = listoverlay.getoverlayitems(); cursor campgroundlist = campgrounddb.getcampgrounds(); if(campgroundlist != null) { while(campgroundlist.movetonext()) { geopoint campgroundlocation = new geopoint(campgroundlist.getdouble(campgroundlist.getcolumnindex("latitude")),campgroundlist.getdouble(campgroundlist.getcolumnindex("longitude"))); //if(shouldshowcampground(campgroundlocation)) { circle circle = showcampground(campgroundlocation); //overlayitems.setmarker(defaultmarker); overlayitems.add(circle); //} } } mapview.getoverlays().add(listoverlay); private static circle showcampground(geopoint location) { paint paintfill = new paint(paint.anti_alias_flag); paintfill.setstyle(paint.style.fill); paintfill.setcolor(color.magenta); paintfill.setalpha(64); paint paintstroke = new paint(paint.anti_alias_flag); paintstroke.setstyle(paint.style.stroke); paintstroke.setcolor(color.magenta); paintstroke.setalpha(128); paintstroke.setstrokewidth(3); homecoming new circle(location, 200, paintfill, paintstroke); }
java android mapsforge
Comments
Post a Comment