itemizedoverlay

Can “overlay” size be zoomed together with the google map on android?

吃可爱长大的小学妹 提交于 2019-12-03 06:16:44
问题 I have been able to use "MapActivity" and "ItemizedOverlay" to draw overlays on google maps on android with Eclipse. But when the map is zooming in and out, the overlay does not change size. I want the overlay to be "fixed" on the map, and zoom in and out along with the map. How can this be done? I can't find the tutorial to define a boundary (e.g. with GPS coordinates as corners for the overlay image). Please provide links if you know some. and any other ways of doing it? Many thanks. 回答1:

Adding custom index to ArrayList or SortedMap when adding overlayitem to ItemizedOverlay

空扰寡人 提交于 2019-12-02 22:21:52
问题 I'm using ItemizedOverlay to display points of events on a map. My main goal is to be able to find an event that was added earlier so that I can delete (or edit) just it without clearing the whole itemizedOverlay. So I decided to add each event to the ArrayList using its own unique ID as an index. This is the code where I add the event. myItemizedOverlay itemizedOverlay = new MyItemizedOverlay(drawable, mapView); OverlayItem overlayItem = new OverlayItem(geoPoint, title, subtext);

android maps asynchronous loading of overlay items

杀马特。学长 韩版系。学妹 提交于 2019-12-02 19:50:56
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? 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. So roughly from memory it would be something like: public class LoadMapItems extends AsyncTask<Integer

Can “overlay” size be zoomed together with the google map on android?

不问归期 提交于 2019-12-02 19:41:28
I have been able to use "MapActivity" and "ItemizedOverlay" to draw overlays on google maps on android with Eclipse. But when the map is zooming in and out, the overlay does not change size. I want the overlay to be "fixed" on the map, and zoom in and out along with the map. How can this be done? I can't find the tutorial to define a boundary (e.g. with GPS coordinates as corners for the overlay image). Please provide links if you know some. and any other ways of doing it? Many thanks. Yes, there is. I had the same issue with my application. Here's an example and it works perfectly. The circle

Adding custom index to ArrayList or SortedMap when adding overlayitem to ItemizedOverlay

左心房为你撑大大i 提交于 2019-12-02 12:44:08
I'm using ItemizedOverlay to display points of events on a map. My main goal is to be able to find an event that was added earlier so that I can delete (or edit) just it without clearing the whole itemizedOverlay. So I decided to add each event to the ArrayList using its own unique ID as an index. This is the code where I add the event. myItemizedOverlay itemizedOverlay = new MyItemizedOverlay(drawable, mapView); OverlayItem overlayItem = new OverlayItem(geoPoint, title, subtext); itemizedOverlay.addOverlay(overlayItem, event_id); mapOverlays.add(itemizedOverlay); This is the ArrayList and

Adding ItemizedOverlay to my mapview

余生颓废 提交于 2019-12-02 01:50:46
问题 i am develpoing a map application with osm. i want to create some marker on my mapview. im using the folowwing code: this.mMyLocationOverlay = new ItemizedOverlay<OverlayItem>(this, items, new ItemizedOverlay.OnItemGestureListener<OverlayItem>() { @Override public boolean onItemSingleTapUp(final int index, final OverlayItem item) { Toast.makeText( SampleWithMinimapItemizedoverlay.this, "Item '" + item.mTitle + "' (index=" + index + ") got single tapped up", Toast.LENGTH_LONG).show(); return

Adding ItemizedOverlay to my mapview

≡放荡痞女 提交于 2019-12-02 00:39:48
i am develpoing a map application with osm. i want to create some marker on my mapview. im using the folowwing code: this.mMyLocationOverlay = new ItemizedOverlay<OverlayItem>(this, items, new ItemizedOverlay.OnItemGestureListener<OverlayItem>() { @Override public boolean onItemSingleTapUp(final int index, final OverlayItem item) { Toast.makeText( SampleWithMinimapItemizedoverlay.this, "Item '" + item.mTitle + "' (index=" + index + ") got single tapped up", Toast.LENGTH_LONG).show(); return true; // We 'handled' this event. } @Override public boolean onItemLongPress(final int index, final

OSMdroid add custom icons to ItemizedOverlay

﹥>﹥吖頭↗ 提交于 2019-11-30 09:59:45
I am using ItemizedIconOverlay class and I'm currently displaying events on the map along with the user's position with the same default icon. How do I change the icon set for each overlay? Is there something similar to the google.maps example: drawable = getResources().getDrawable(R.drawable.marker); drawable3 = getResources().getDrawable(R.drawable.disruption); drawable2 = getResources().getDrawable(R.drawable.marker_me); itemizedOverlay = new MyItemizedOverlay(drawable, mapView); itemizedOverlay2 = new MyItemizedOverlay(drawable2, mapView); itemizedOverlay3 = new MyItemizedOverlay(drawable3

Moving icons on a Android MapView

淺唱寂寞╮ 提交于 2019-11-30 03:55:46
I'm working on an application that displays the location of moving items on a Google MapView. I need a way to update the position of the icons that represent the items (as well as change the facing of the icons every two seconds as updated data comes in). I currently have an activity in the app that extends MapActivity. On to this I have overlaid a static Overlay that draws some lines on the map and an ItemizedOverlay that draws a static icon. There is a draw() method that claims to be used by animated overlays, but overriding it to do my animations still doesn't make anything animate. Do I

Android 2.1 GoogleMaps ItemizedOverlay ConcurrentModificationException

若如初见. 提交于 2019-11-29 08:52:27
I cannot figure out the origin of the ConcurrentModificationException . In my activity I'm calling updateMapOverlay() . I'm also calling updateMapOverlay() inside another Thread (a TimerTask ) that is invoked on regular intervals. I'm taking the appropriate locks when invoking updateMapOverlay() from both the threads. Is this problem being caused because I'm invoking updateMapOverlay from inside a non-UI thread (i.e., TimerTask ). Has anyone else faced a similar issue ? private void updateMapOverlay() { this.itemizedOverlay.refreshItems(createOverlayItemsList()); List<Overlay> overlays =