Android :: Displaying ItemizedOverlay(s) On A Map ?
Oct 31, 2010
I'm having some troubles with displaying ItemizedOverlay(s) on a map.
Here I extracted a simplified example of what I need to do.
Here's my Map class:
CDE:........
I followed the guide provided by google to extends the ItemizedOverlay class
CODE:...................
As it is clear from the code I need to update at fixed times a map UI with possibly new positions to do so I'm using a timer, but I think I might fall in some kind of thread issues I don't know how to handle, since when running a test I can see in the Log what happens but no marker is drawn on the map.
View 1 Replies
Jun 13, 2009
Is it possible to use "stretchable" graphic as pin in ItemizedOverlay? If not how can I draw NinePatchDrawable on Canvas?
View 4 Replies
View Related
Jan 31, 2010
I've seen all the posts about using setLastFocusedIndex(-1).
I've tried that but my app is still crashing.
CODE:...............
View 2 Replies
View Related
Nov 15, 2010
This does not refer to anywhere in my code at all.
How do I go about getting to the bottom of it?
CODE:..........................
Here is the draw method of the ItemizedOverlay
CODE:..........................
I now print out the stacktrace and no difference!
View 1 Replies
View Related
Oct 24, 2009
I want to draw 20 pins on a MapActivity. Each pin has a small pin image, but I have to dynamically overlay a small bit of text over each pin at runtime.
Looks like I have two options:
#1) Itemized Overlay This is the suggested method. I put all my pins in one ItemizedOverlay object, and that counts as a single Overlay object for my MapView.
#2) One Overlay per pin Create a separate Overlay instance for each pin I need to render.
The problem I see with using method #1 is that you need to set a drawable for the item. This would mean that I need to create 20+20 (one for focused/non-focused state each) bitmaps and keep them in memory for the duration of my app. On the other hand, Overlay lets you override the draw method so I can do the simple compositing at runtime.
The other issue with Itemized Overlay - although it handles focus for you - does it move the focused item to the front of the z-order when selected?
View 2 Replies
View Related
Sep 23, 2010
I have an itemizedOverlay extended and I want to increase the hit detection on the OverLayItem's if this is possible?
View 1 Replies
View Related
Feb 15, 2010
I'm using Google maps. I put the markers on map and my inherited ItemizedOverlay overrides onTap() method.
Markers are 32x32 images.
However, I can tap quite a bit away from the marker and still receive the event. This becomes a problem when markers are close to each other.
View 2 Replies
View Related
Jun 15, 2010
I have a MapView where I would like to be able to tap the map to create a new item at that location if there is no item there, or display the info about the item if there is.
I tried overriding both the onTap(int) and onTap(GeoPoint, MapView) methods but apparently if the second method is overridden the first never gets called (commenting one or the other lets each one work as I expected).
I thought about just checking if an item was at the location, but there doesn't seem to be any handy methods available to do that (other than iterating through the list of items and checking each manually).
View 17 Replies
View Related
Aug 27, 2010
I am developing an application for the Parisian Metro. One of the functions is a map where you can click the metro stations and see what are the metro lines, and when are the next 4 trains on this station.
I have hence created a MapActivity and an ItemizedOverlay classes.
On my device it is working perfectly, but I am getting some logs from the users with a crash, and I really don't understand what's wrong.
My map activity adds ONE ItemizedOverlay that displays a blue dot for the current user location. This overlay also listens to onTap, which depending on the coordinates of the tap, will try to find metro stations (for which I know the lat/lon coordinates). This is working perfectly.
The stack trace of the crash is:
CODE:.....................
Sometimes it comes from different lines but it always finishes crashing at OverlayBunde.java:42
As is does not mention my code, I don't know what's wrong.
You can get the source code of the MapActivity and the the ItemizedOverlay: http://code.google.com/p/metroparis/source/browse/trunk/src/org/bicou/metro/
The activity class is ACarteStations and the overlay class is StationMetroMapOverlay.
View 1 Replies
View Related
Feb 4, 2010
When I add a new item to my ItemizedOverlay the onTap display I have set appears X times, where X is equal to the number of items that I added. So for example, if I add one item and tap it, it the onTap method gets called once, and in the LogCat I get:
02-04 23:28:56.188: INFO/NotificationService(52): enqueueToast pkg=android.mapit callback=android.app.ITransientNotification$Stub $Proxy@4394c100 duration=0
If I add a second item and click ANY of the other items, the onTap method gets called twice and I get the following in LogCat:
CODE:.....................
If I add a third item and click ANY of the other items, the onTap method gets called three times and I get the following in LogCat:
CODE:...................................
Any idea why this would occur? I'm running into issues with it affecting other things like removal of items.
View 2 Replies
View Related
Jul 3, 2009
I have a method in my ItemizedOverlay class which takes an object as a parameter and depending on it's certain values returns an appropriate icon. What's the best way to access the drawable resource from within ItemizedOverlay as you can't access it directly like in an activity? The only idea I have for now is to pass the resources as a second argument...
View 3 Replies
View Related
Sep 7, 2009
I've try to make a mapview with itemized overlay and it's not work. I share my code if anyone see anything :
java class mapview code...
View 4 Replies
View Related
Jul 6, 2009
I have the following exception that occurs I don't really know in which circumstances.
I'm just trying to add an overlay to may viewMap, and I don't have anything special in my classes. The most strange thing is that it worked for a while, then it broken again when I changed my image!
CODE:............................
View 4 Replies
View Related
Nov 23, 2009
In my application I would like to mark different spots on a map. What I'm now wondering is if there's a way to use a simple 9-patch image and add the spot's name as text to it or would I need to draw everything myself (including the text) in the draw() method of ItemizedOverlay?
View 1 Replies
View Related
Apr 14, 2010
I am trying to display one png (drawable) on a map in about 300 points. I am retrieving the coordinates from a Sqlite table, dumping them in a cursor. When I try to display them by parsing through the cursor, it takes for ever for the images to be drawn, about .5 second per image. I find that to be suspiciously slow, so some insight on how I can increase performance would help. Here is the snippet of my code that does the rendering:
while (!mFlavorsCursor.isAfterLast())
{
Log.d("cursor",""+(i++));
point = new GeoPoint(
(int)(mFlavorsCursor.getFloat(mFlavorsCursor.getColumnIndex(DataBaseHelper.KEY_LATITUDE))*1000000),
(int)(mFlavorsCursor.getFloat(mFlavorsCursor.getColumnIndex(DataBaseHelper.KEY_LONGITUDE))*1000000));
overlayitem = new OverlayItem(point, "", "");
itemizedoverlay.addOverlay(overlayitem);
itemizedoverlay.doPopulate();
mFlavorsCursor.moveToNext();
}
mapOverlays.add(itemizedoverlay);
I tried to isolate all the steps and it looks like the slow one is this: itemizedoverlay.doPopulate(); This is a public method in my class that extends ItemizedOverlay that runs the private populate() method.
View 1 Replies
View Related
Jun 7, 2010
In the description of how to add a list of options to an AlertDialog the official Android documentation alludes to saving a users preferences with one of the "data storage techniques." The examples assume the AlertDialog has been spawned within an Activity class.
In my case I've created a class that extends ItemizedOverlay. This class overrides the onTap method and uses an AlertDialog to prompt the user to make a multi-choice selection. I would like to capture and persist the selections for each OverlayItem they tap on.
The below code is the onTap method I've written. It functions as written but doesn't yet do what I'd hope. I'd like to capture and persist each selection made by the user to be used later. How do I do that? Is using an AlertDialog in this manner a good idea? Are there better options?
CODE:.......................
View 2 Replies
View Related
Nov 10, 2009
In 1.6 sdk, map is not displaying, i put all the permissions and uses- library in manifest, added the external map.jar from add-on... created AVD manager with google-API 4.But when running, its showing
11-10 15:31:00.255: ERROR/AndroidRuntime(1587): Uncaught handler: thread main exiting due to uncaught exception
11-10 15:31:00.295: ERROR/AndroidRuntime(1587): java.lang.NoClassDefFoundError: com.nithin.ViewMap
11-10 15:31:00.295: ERROR/AndroidRuntime(1587): Caused by: java.lang.IllegalAccessError: cross-loader access from pre-verified class
View 3 Replies
View Related
Feb 20, 2009
I've some question regarding .svg file.
1. Is it possible to display .svg file in our application as an icon or picture or image at background? How can we acheive it?
2. How to render/ manipulate an .svg file on some event firing? 3. Does Android support org.w3c.dom.svg package for parsing svg file? Please let me know soon your suggestion in this regard.
View 2 Replies
View Related
Mar 3, 2010
Any one please help me to display a keyboard in my app.I want to show my keyboard when i click on the textfield
View 1 Replies
View Related
Apr 29, 2010
All I want to do is display a URL image. Does anyone have a template I could use that already displays an image that I can possibly modify? I've been looking all over the internet and the only answers I've found are extremely complex.I'm very good at learning something once I can get it to work from my end then proceed to analyzing the code.I am VERY new at Android programming.
View 5 Replies
View Related
Mar 8, 2010
I want to develop an app, which displays every Contacts with their birthdays but I donīt know how to display the contacts.Is there a way to do that?
View 15 Replies
View Related
Dec 4, 2009
I am trying to make sure my application looks good on the droid, my AVD seems to be messing up. The resolution is off, as the apps shortcuts are spaced the same as my g1 (I know they are usually spaced further apart, and the AVD loaded correctly once, and it's been jacked up since). Also changes I make are often not reflected, and when running a build it no longer says application already installed attempting to re-install, it just says installed successfully.In short, is there any way to fix an AVD that is acting up like this? I have tried deleting it and remaking it, but that doesn't fix it.
View 2 Replies
View Related
Sep 15, 2010
Alright, so I would like to have a custom dialog, but I cannot figure out for the life of me how to make it appear when the function is called.
CODE:..........
What could I do?
View 3 Replies
View Related
Aug 14, 2009
I need help with showing the integrated virtual keyboard on-screen. I extended a View class and I implemented these two methods (most of it is just stub code; for now I only want to display the keyboard):
CODE:.............
Where editor is an instance of my View. I noticed in the debugger that my onCreateInputConnection() is executed but after that the keyboard is not displayed on the screen. Using the TextView widtget and it's subclasses is not an option.
View 5 Replies
View Related
Nov 21, 2010
My ImageView for some odd reason is always displaying a picture in the middle, left of my screen despite the xml code insisting it to be in the center.So, the page should display as Picture in the middle, extending the width of the screen, the text below that and the button below that.But for some reason, the picture is displayed as a small, box thumbnail in the middle left of the screen.any ideas on a workaround?
View 1 Replies
View Related
Dec 6, 2009
I'm trying to develop an application which display the locations of contacts on a map (a Msn-like but for geo-localisation). I search to display a route between my own location and a contact location I want to join but I find yet no solution to do this. In the Android API and Maps add-on API I just find classes to display and listen Location, Distance, GeoPoint, etc., but no possibility to display a route between two points. Is it possible or not provided by the API?
View 7 Replies
View Related
Jul 1, 2010
I've had a G1 for the past 18 months and have just upgraded to a Xperia X10, only problem is I don't have a note of my wep/wpa key for the dodgy router at work, I know I keyed it into my old G1 (which I still have) but can't find a way to display it in clear text.
View 6 Replies
View Related
Mar 23, 2010
i opened my application after i am not doing any kind of operation i leave the mobile 5 min after 5 min when i touch the my application it is showing black screen.is there any way to avoid this idle state.
View 1 Replies
View Related
Sep 22, 2009
I want to display a progress when the application start,then close progress when all data load completely.How can I do that?
View 1 Replies
View Related
Mar 23, 2010
I want to display all the installed packages to user. Below is the code snippet I used but not sure why it is not working.
int flags=0; PackageManager pack = null; List<PackageInfo> packInfo= pack.getInstalledPackages(flags); CharSequence[] items = new CharSequence[packInfo.size()];
Vector <Process>allProcesses = new Vector <Process>(); for (int i=0;i<packInfo.size();i++) { String packI = "Packages"+packInfo; Toast.makeText(this, packI, Toast.LENGTH_LONG).show();
}
I just to display the entire list of packages to user. Any idea what's the problem with the above code?
View 5 Replies
View Related