overlayitem

Circle drawable looks like oval on map

纵然是瞬间 提交于 2019-12-25 04:58:11
问题 Hi I am trying create circle shape on map. For that i am using ground overlay item. I tried draw circle shape with drawable xml file. First I tried in normal activity layout and it shows me perfect circle shape. same thing I tried to draw on map it looks like oval shape. My code for drawable and layout is as follows : <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <solid android:color="#666666"/> <size android

Controlling OverlayItem size

被刻印的时光 ゝ 提交于 2019-12-21 05:05:00
问题 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

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

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

Android: ItemizedOverlay onTouchEvent and onTap overlapping

心不动则不痛 提交于 2019-11-29 00:40:25
I am trying to place a marker on a map overlay and then present a dialog when the user selects the drawable. The problem is the events seem to overlap. After I click the map and the marker is drawn, the onTap fires immediately afterwards, and because I have just drawn the marker, it is directly under the onTap event, so my dialog always fires. Does anyone have any suggestions on how to make these events mutually exclusive? Here is the code for the map activity: public class SelectGameLocation extends MapActivity implements GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener

GoogleMaps: custom ItemizedOverlay and OverlayItem, the correct way to show different marker

非 Y 不嫁゛ 提交于 2019-11-28 22:09:54
I've been searching long for clear informations about the right way of extending ItemizedOverlay and OverlayItem, but the result I get does not satisfy me yet. In a few words, I need to show on a map different kind of markers related to a number of locations; the type of the marker to be displayed is determined by specific properties of the location itself. I will also need to display a certain marker when a marker is selected, and another one when the marker is unselected or unfocused. According to what I understand, this is what I wrote: public class MyItemizedOverlay extends ItemizedOverlay

Android: ItemizedOverlay onTouchEvent and onTap overlapping

情到浓时终转凉″ 提交于 2019-11-27 15:24:14
问题 I am trying to place a marker on a map overlay and then present a dialog when the user selects the drawable. The problem is the events seem to overlap. After I click the map and the marker is drawn, the onTap fires immediately afterwards, and because I have just drawn the marker, it is directly under the onTap event, so my dialog always fires. Does anyone have any suggestions on how to make these events mutually exclusive? Here is the code for the map activity: public class SelectGameLocation

GoogleMaps: custom ItemizedOverlay and OverlayItem, the correct way to show different marker

自闭症网瘾萝莉.ら 提交于 2019-11-27 14:15:52
问题 I've been searching long for clear informations about the right way of extending ItemizedOverlay and OverlayItem, but the result I get does not satisfy me yet. In a few words, I need to show on a map different kind of markers related to a number of locations; the type of the marker to be displayed is determined by specific properties of the location itself. I will also need to display a certain marker when a marker is selected, and another one when the marker is unselected or unfocused.