itemizedoverlay

dynamically Change Itemized overlay draw circle using seek bar progress

不羁岁月 提交于 2019-12-08 10:20:48
问题 i m maikng an app using Maps. I m drawing circle on a specific point using itemized overlay and it works pretty fine. But i want to change the radius of that circle with the seekbar progress value. Can any body guide me to this Thanks in advance. 回答1: To Draw the Circle with on map We have to use itemozied Overlay But to change it with the Progress of Seek Bar We need to do the Following thing that will work with Seek Bar and also if you want to set the zoom level using seek bar It is handled

Programmatically creating icon to use as ItemizedOverlay drawable - Android

好久不见. 提交于 2019-12-06 13:49:17
问题 I am trying to programmatically draw a parking icon to place as the drawable for an itemized overlay on a map. The icon consists of a blue square with a white 'P' in its centre of which I would like to programmatically change the colour of the square to denote different parking types. I've tried creating it via the canvas using drawRect & drawText but I cannot find a simple way of centering the text in the square and I cannot find a way to center the canvas on the coordinates - it keeps

ItemizedOverlay Rotate marker and crash

醉酒当歌 提交于 2019-12-05 10:36:54
问题 Bit of a strange post as this is something I posted before, thought it was solved but didn't! I have a situation where I need to use a custom Drawable for each marker, the effect I need is to rotate the marker by a set number of degrees and am probably going the wrong way about this completely. As a start I am using the excellent Creative Commons as this does work and only breaks after my additions! https://github.com/commonsguy/cw-advandroid/tree/master/Maps/NooYawkAsync The previous post

Programmatically creating icon to use as ItemizedOverlay drawable - Android

别来无恙 提交于 2019-12-04 18:25:51
I am trying to programmatically draw a parking icon to place as the drawable for an itemized overlay on a map. The icon consists of a blue square with a white 'P' in its centre of which I would like to programmatically change the colour of the square to denote different parking types. I've tried creating it via the canvas using drawRect & drawText but I cannot find a simple way of centering the text in the square and I cannot find a way to center the canvas on the coordinates - it keeps wanting to anchor from the top left hand corner. I've alternatively tried creating an XML layout to convert

Android itemizedOverlay's onTap action overrided

我只是一个虾纸丫 提交于 2019-12-04 14:00:07
问题 I have a class : class MapItemizedOverlay extends com.google.android.maps.ItemizedOverlay<OverlayItem> { private Context context; private ArrayList items = new ArrayList(); public MapItemizedOverlay(Context aContext, Drawable marker) { super(boundCenterBottom(marker)); context = aContext; } public void addOverlayItem(OverlayItem item) { items.add(item); populate(); } @Override protected OverlayItem createItem(int i) { return (OverlayItem) items.get(i); } @Override public int size() { return

ItemizedOverlay Rotate marker and crash

不打扰是莪最后的温柔 提交于 2019-12-03 21:52:58
Bit of a strange post as this is something I posted before, thought it was solved but didn't! I have a situation where I need to use a custom Drawable for each marker, the effect I need is to rotate the marker by a set number of degrees and am probably going the wrong way about this completely. As a start I am using the excellent Creative Commons as this does work and only breaks after my additions! https://github.com/commonsguy/cw-advandroid/tree/master/Maps/NooYawkAsync The previous post and the code is here Android Maps NullPointerException ItemizedOverlay If anyone can recommend a better

Controlling OverlayItem size

送分小仙女□ 提交于 2019-12-03 15:20:39
I'm building a map with a few dozen OverlayItems in a single ItemizedOverlay. My map is made to be viewed very close up (about zoom level 18+), with the OverlayItems in very close proximity to one another. The map looks good when zoomed in. However, if the user zooms out the icons begin to overlap and everything looks incredibly junky. Is there a way to control the OverlayItem icon size so that it scales with the map? If not, is there a way to hide the icons once a specific zoom level is reached? Any other suggestions on how to approach this problem? Joshc, fegruior, You folks may want to

Android itemizedOverlay's onTap action overrided

烈酒焚心 提交于 2019-12-03 09:48:50
I have a class : class MapItemizedOverlay extends com.google.android.maps.ItemizedOverlay<OverlayItem> { private Context context; private ArrayList items = new ArrayList(); public MapItemizedOverlay(Context aContext, Drawable marker) { super(boundCenterBottom(marker)); context = aContext; } public void addOverlayItem(OverlayItem item) { items.add(item); populate(); } @Override protected OverlayItem createItem(int i) { return (OverlayItem) items.get(i); } @Override public int size() { return items.size(); } @Override protected boolean onTap(int index) { OverlayItem item = (OverlayItem) items

Remove all Overlays

谁说胖子不能爱 提交于 2019-12-03 08:32:54
I have the following code to add an Overlay myMapView.getOverlays().add(sites); myMapView.invalidate(); I also have the following remove code where sites is a global variable. if (sites != null) { // myMapView.getOverlays().clear(); myMapView.getOverlays().remove(sites); myMapView.invalidate(); sites = null; } Sometimes I am left with duplicates so would like a way to remove all overlays from a map, is this possible? Looks like I did have the answer all along! myMapView.getOverlays().clear() 来源: https://stackoverflow.com/questions/3696415/remove-all-overlays

android maps asynchronous loading of overlay items

こ雲淡風輕ζ 提交于 2019-12-03 06:25:31
问题 I have a map view with thousand of items that i want to load on it. obviously i can't load them all when the view is created. I guess that I have to load them asynchronously according to what is currently displayed.. How can I load only items located in the map portion displayed on the screen? 回答1: Use AsyncTask to load the individual layers per screen. Get the Lat/Long of the currently visible map using MapView api. On the backend send them the lat/long bounding box to get the items you want