Android :: Clear Mapview Overlay Drawing In Droid
Feb 16, 2010
I am doing one small GPS application. I have to show multiple palces . I can able to show multiple places using custom overlay method.Now i have to show route between two points , while showing route i have to show only that two points. remaining all points should disappear but i don't know how to disappear the other points.
View 1 Replies
Aug 10, 2010
I created a custom OverlayItem class so that I could essentially have one kind of OverlayItem whose Drawable marker would set itself depending on the state of some data that I pass into it. I have attempted to accomplish this by, on my first attempt, utilizing the setMarker method within the OverlayItem class. Once that did not work I attempt to override the getMarker method and have it return the appropriate marker to represent the data. Both of these attempts ended with nothing being drawn on the map...however if they are commented out the markers draw just fine (except they of course use the default marker, which isn't what I want). Here is my code for my custom OverlayItem class (the commented out methods I have tried and they have not worked):
private class MyOverlayItem extends OverlayItem {
private Context mContext; private MyData mData;
public MyOverlayItem(GeoPoint point, MyData data, Context context) {
super(point, data.getWhat(), data.getWhere()); this.mContext = context; this.mData = data;
/*if(data.getTemp() > 200) this.setMarker(res.getDrawable(R.drawable.icon_data_hot_l));
else if(data.getTemp() > 100) this.setMarker(res.getDrawable(R.drawable.icon_data_neutral_l));
else this.setMarker(res.getDrawable(R.drawable.icon_data_frozen_l));*/ }
/*@Override public Drawable getMarker(int stateBitset) {
Resources res = this.mContext.getResources(); if(this.mData.getTemp() > 200)
return res.getDrawable(R.drawable.icon_data_hot_l); else if(this.mData.getTemp() > 100)
return res.getDrawable(R.drawable.icon_data_neutral_l);
return res.getDrawable(R.drawable.icon_data_frozen_l);
}*/ }
Is there a way to do what I am attempting to do or do I need to make a unique OverlayItem class corresponding to each state of my data?
View 3 Replies
View Related
Sep 28, 2010
I have subclassed Overlay as LandMarkOverlay (and implemented an onTap(GeoPoint) method).
In the main activity I do this:
setContentView(R.layout.main);
MapView mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
landmarkOverlay = new LandmarkOverlay();
//add the landmarkOverlay to the list
mapView.getOverlays().add(landmarkOverlay);
What else do I need to do so that when the user taps the screen, landmarkOverlay's onTap(GeoPoint) method gets called?
View 1 Replies
View Related
Oct 29, 2010
Trying to draw a circle at a longitude/latitude position. The circle below doesn't show up, does anybody know why?
View 5 Replies
View Related
May 13, 2010
I want to create a simple Map based application in android ,where i can display my current position.Instead of overlaying a simple Image on the MapView to represent the position, i want to overlay the GLSurfaceView on the MapView. But i don't know how to achieve this. Is there any way to do that?. Please anybody knows the solution help me.
View 1 Replies
View Related
Jul 3, 2009
How to receive events on MapView using Overlay? Overlay Code...
View 2 Replies
View Related
Jun 11, 2010
I am trying to overlay route data in KML files on a MapView.
The following code works great:
CODE:................
The only problem I have with this is that I don't need to re download these KML files every time. I have about 10-15 KML files that will rarely change. Also since it has to connect, download, and parse these each time there is a delay in opening the maps.
It would make a lot more since for me to save these as a local resource and have the URI reference it there. Is there a way to construct a URI using the geo: scheme and have it point towards a local resource?
It looks like file:///sdcard support was included in 2.1. The only reference I could find to it was at the end of this bug report thread. I am currently at work and don't have time to play with this yet but I would like to figure it out later. I feel like there are a lot of people on stackoverflow and elsewhere who would really appreciate a reasonable way to do this.
View 1 Replies
View Related
Aug 18, 2010
I like tu use the MapActivity to display some pins. When a pin is pressed i like to open a description. This can I obtain following the tutorial: http://developer.android.com /resources /tutorials/views/hello-mapview. But now I like to put a button on the overlay window. That button should open a detail activity. How can I make this? How is possible to personalize the overlay "info window"?
View 2 Replies
View Related
Jul 16, 2010
I had found a lot of stackoverflow post about save an Activity and the reload it.
My question: How can I have an Activity with an MapView and after reload the same mapview?
What is the best way to switch between activity and views?
View 2 Replies
View Related
Dec 26, 2009
I've searched about sets line's width and no succeed.
How to set Line width ? What method is used for it?
View 1 Replies
View Related
Sep 17, 2010
Is there off screen drawing possible in android like a imageContext in objective C. if it is kindly tell me the link or some kind of hint.
View 2 Replies
View Related
Jun 24, 2010
What exactly does HTC Sense Clear Data actually clear? That may be a solution to reverting back to 5 homescreen pages instead of 7 without having to do a factory reset. Just curious as to what I am going to mess up? Will i just have to personalize the homescreen again, put widgets up, reconnect to fb, twitter, myfaves, etc. It's not going remove any 3rd party apps, just make me create new widgets, etc..?
View 3 Replies
View Related
Sep 1, 2010
I am developing one Map based application and in this application i want to draw Multiple Overlay Item(With Marker) on map.so anyone can told me the efficient way of doing it.
View 1 Replies
View Related
Feb 17, 2010
How to get MapView API in android?
View 2 Replies
View Related
Feb 1, 2010
I have a MapActivity that contains a MapView with some custom controls, state information, and an ItemizedOverlay composed by some locations that I draw using the default approach (using populate(), super.draw() and createItem()) and by some lines that I draw in the overrided draw() method.
So, when the activity is paused, I have to save:
Some state information
The ItemizedOverlay
[Maybe more Overlays in the future.]
I'm saving the state information as usual, putting them in the bundle. I'm thinking in doing the same with the Overlays, implementing Parcelablein each one of the OverlayItems and so, but I don't know if there is a better way to store the complete state of the MapViews.
The information depends on remote requests that I don't want to repeat each time the activity is paused. Any recommendation?
View 2 Replies
View Related
Mar 19, 2010
I working on map view. i want to put overlay item on the map view. that overlay items are all depends on currently showing map view and zoom level. how to get current map view's longitude and latitude of that four corner and how to analyze how many overlay item inside it. also we have to check thee zoom level.Any Idea? how to do it?
View 1 Replies
View Related
Nov 16, 2009
So this weekend while checking out the new Wegman's grocery in Leesburg, my almost 4 year old daughter asked to play with my iPod Touch. I didn't have it with me cause it has a cracked screen that I'm in the middle of fixing so I thought I would hand her my Droid to play with. I had put a couple of games and "painting" apps on one of the homepages that I designated for her, but after only a couple of minutes, she didn't like it. Are there any good games/drawing/painting apps out there for kids? On the iPod she had games like "Anisays" (spell the animal on the screen with drag and drop tiles and it makes a sound), "Animatch" (like memory,flip tiles to find a match and it makes a sound), and several decent drawing/painting apps that had pull out drawers where you could change colors or pencil size. Most of the stuff in the free area of the market seems kinda cheezy and with terrible graphics.
View 3 Replies
View Related
Aug 31, 2010
Just wondering if there is a standard/default overlay/marker that I can use in the MAPVIEW?
I have been searching on the web and all tutorials talk about extending the Overlay and put your custom image on it.
Is there a easier way? I just want to have the a marker, nothing fancy.
View 1 Replies
View Related
Jan 16, 2010
I have a MapView that I'm displaying a "useful radius" (think accuracy of coordinate) in. Using MapView's Projection's metersToEquatorPixels, which is admittedly just for equatorial distance) isn't giving me an accurate enough distance (in pixels). How would you compute this if you wanted to display a circle around your coordinate, given radius?
View 1 Replies
View Related
Sep 25, 2010
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.
View 3 Replies
View Related
Feb 5, 2010
I am looking for a way to overlay a route in google maps.
What I want is to take this map Greenways Oak Ridge Google map and get it to my google My Maps. Then I can pull it up in Maps and use my location to see where I am in relation to where I need to be in case I want to take a different route to need to shorted the ride due to darkness.
Most rides I do I can find these maps but cant do anything with them.
View 13 Replies
View Related
Oct 1, 2010
I own an Android based handset. It keep telling me that its internal memory is low. I've uninstalled many unused 3rd part apps, and restart the device. Its still saying its running low. I guess there are cache's/legacy files remaining somewhere.
View 1 Replies
View Related
Aug 30, 2010
I want to clear catch memory when I close my application in Android. A code example would be helpful.
View 2 Replies
View Related
May 28, 2010
How to clear the cached image from memory programatically in android? i am iconic list view when i scroll its reloads the image.So its produce the OutofMemoryError. i want clear the cache while gets this exception. how to do that?
View 3 Replies
View Related
Aug 16, 2010
I need clear idea on Xml-Parsing in android
View 2 Replies
View Related
Sep 17, 2010
New to Android and just looked at http://developer.android.com/reference/android/util/Log.html
My question is regarding everything except debug. How do these Log entries get cleared such as Error so that they don't consume space? Also, Is there a way that the logfile can be queried so that it can be sent to a central web service or something for quality purposes etc.?
View 1 Replies
View Related
Jul 21, 2010
What is your best drawing app?
I've tried Draw!, Draw(er), and MagicMarker, but I dunno, they each have their pros and cons and can't find one that suits me well. I'm not looking for Photoshop on my phone, but something better than a colored line. So what is your best drawing app?
View 3 Replies
View Related
Aug 25, 2010
I want to clear sd card memory via android coding.
View 1 Replies
View Related
Jan 21, 2010
Can any of you guys out there tell me how to clear my market search cache? I'm gone through the steps in Settings/Applications but it doesn't work.
View 1 Replies
View Related
Sep 2, 2010
From what I can incur out of the SharedPreferences documentation, I can update a preference, add one or clear all preference values in a shared preference file.
But I want to completely clear everything inside a shared preference file, not just the values, but the preferences they refer to as well.
View 2 Replies
View Related