Android :: OverlayItem Not Displaying Markers / What To Show It?
Jul 5, 2010I have the following code and the markers are not appearing on the map at all! code...
View 1 RepliesI have the following code and the markers are not appearing on the map at all! code...
View 1 RepliesI am displaying markers on a map. I am not sure how I can specify a different drawable resource for different markers?
I would like to show a green pin if locations distance < 50, etc. etc.code...
As the object of this topic. is there a limit for the numebr of markers to show on a MapView at the same time with the Google API?
View 3 Replies View RelatedI'm adding AdMob ads (say that five times fast) to my finished, published Android app. I added the code from the PDF included with AdMob, following their instructions to a tee. The test ads show up fine on my emulators and specified test devices. They just don't appear in the published marketplace app when you download and run it. I still get impressions on my AdMob page however. Any ideas?
View 3 Replies View RelatedHas anyone else had issues with input boxes not displaying what is typed? I have tried the stock keyboard, better keyboard, and am now using swype. They all do it and its random. I regularly use Google Talk and will be chatting for a little bit, hit the end button to lock the screen, come back 2 minutes later and it won't take anything I type. It usually comes back 5-10 minutes later or if I reboot.
This has been going on since 1.5 and continued in stock 2.1 and is still there rooted using Fresh 2.1.
I would like to how to use OverlayItem's fields (Title and snippet) 'cause they are never displayed on the map?
View 2 Replies View RelatedCurrently I used a map view and placed some overlay items in them
I overiden the onTap function in ItemizedOverlay so that when user tap on the markers icons on the map, some action will perform.
However, I don't know how to know which marker is being tapped so that the related data of the item will be displayed in the screen. How can I do that?
From everything that I've seen and have been reading, I'm apparently supposed to add all my OverlayItems in the constructor, then call Populate().The problem I have conceptually, is that if I'm pulling these items from a database (fed by a web site), then when exactly do I update the items?Also, it seems to me that it's a waste of resources to feed it all the items in advance instead of the ones pertaining to the current location... This seems to be the perfect case to use a ContentProvider, but I don't see anything indicating that one can be used with either ItemizedOverlay or anything else related to the Google Maps API.
View 14 Replies View RelatedI want to be able to get some reference to the curent object being drawn. code...
Above is my draw method and I want to extend the draw method to write the title underneath each item for example. This would require the .getTitle() method from the OverlayItem. Possibly some tracking of objects outside of this method but not sure where to put it....
When a marker is clicked on google map, a small square area is displayed with hyperlinks. I guess OverlayItem does not render hyperlinks for its snippet. How to achieve this? Ideally I want to assign a layout with all sorts widgets. Presume I can display a small floating activity window when the marker is clicked, but is this the standard way doing this? The drawback of floating activity window is that if want to click another marker, user has to dismiss the current window first.
View 2 Replies View RelatedI am able to display multiple overlayItems on Googlemap, now I want to change icon of any specific overlayItem (to show it is currently selected event). I want to do it through navigation buttons (next, previous) as on Google maps.
I am using StateListDrawable to display icons for OverlayItems. code...
Now my question is how do I change the state of any overlayItem/Icon on map when user click on one of navigation keys?
I have a simple overlay for a Google Map: http://pastebin.com/Rg8miMSh and I add/remove items on it depending on the zoom level. After removing/adding I call populate on the overlay and invalidate on the map view. Everything works just fine, except 1 glitch: after an item was removed, if I tap its location onTap is still triggered and because the OverlayItem is not there anymore i get java.lang.ArrayIndexOutOfBoundsException in com.google.android.maps.ItemizedOverlay.maskHelper(ItemizedOverlay.java: 562) (full stack trace - http://pastebin.com/KThn4ZLE )
Anyone knows why this is happening or how to fix it? Initially i called clear and added all items all over again which didn't seems to cause this problem. However having many items this was becoming a performance issue. Adding/removing only the difference works much faster and I would like to keep this method.
I have been looking this but haven't found a concrete example is there a way to click a specific point on a Map and then draw a overlayitem it?
View 1 Replies View RelatedI currently have implemented an overlayitem that shows an icon for geopoint on a map application in Android. When the icon is clicked, it brings up an AlertDialog from the onTap method below.Does anyone know how to display a map message bubble directly above the icon overlayitem with 2 callout buttons one to the left of the title and one to the right of the bubble? Does anyone know how to make the overlayitem draggable so I can press and hold it and drag it across the map. I am trying to duplicate the draggable icon behavior that's available on the iPhone.
View 2 Replies View RelatedI wanted to know how to add marker on a map? right now, i am trying to build an application that shows the persons current location, and i can follow it. but the problem is i don't have a pointer, so the changing is vague. what i want is to show the persons location with a marker(e.g some kind of bubble) and follow it.=
View 2 Replies View RelatedI am displaying a custom marker on my Google Map. They are placed fine, but they have this funny shadow. How can I remove the shadow? code...
View 1 Replies View RelatedI've got a place I want to add on my map at a particular lat / lng. I'd like to display that on my map when the activity starts. How would I do this?
View 1 Replies View RelatedHow would dynamically draw markers on a Mapview? I've got the following code which will hardcode one point in. I'm looking to pull values from a database..
View 1 Replies View RelatedI want to clear all map overlays or markers from google map and using following code
if(!mapOverlays.isEmpty())
{
mapOverlays.clear();
}
which is giving me exception can any one guide me? am i right or wrong if i am wrong then kindly provide me the solution to my problem. i want map clean if there is any marker on it.
I'm wondering if it is possible to move markers when using a MapView. I use a fullscreen MapView which has a few (not more than 5) markers which I would like to move and update by just moving the markers to a new position.
View 2 Replies View RelatedI have done my fair share of google searches for this and have come up empty.
I have a set of marker(25) that are being displayed on a MapView. I would love to be able to have it zoom to a reasonable level to make the markers readable.
I have lot of markers on my map. Zooming in each marker shows me a position. but zooming out the markers are overlapping each other and it is more difficult do determine the position of a marker.
Is there a way to scale the marker image depending on the zoom factor?
On my app I will be reading in from an XML file thats formatted something like this
<database> <db1>
<db> <name>name here</name> <street>street here</street> <long> longitude here</long> <lat> latitude here </lat> </db>
<db> <name> new name here </name> <street> new street here </street> <long> new longitude here </long> <lat> new latitude here </latitude> </db>
</db1> </database>
With this information I need to create Overlay Markers on the map (using latitude and longitude) and when they're clicked on I need it to display the name with the address. Depending on the conditions of where the map is, the number of markers will be different so I need a dynamic model for reading in these markers.
If I were to use Document methods like getElementById(String name) then I couldn't call getElementById("name") because it would likely try to call just the first <name></name> or give an unintended result.
I would like to further annotate the custom markers I have placed on a MapView (using ItemizedOverlay) by displaying a simple text label that appears for a particular item when the onTap event is fired.
This is a trivial exercise in the Google Maps JavaScript API and in MapKit on iPhone, but it is not obvious to me what the best or easiest way to do this is on Android.
Using Google Maps on Android does anyone have any ideas on how to load only markers that would be displayed on the current screen? I'm thinking about sending a request to a web service that returns the lat/lng for the relevant markers. But what would the parameters be that I could use to calculate if a given lat/lng is within the screen?
View 1 Replies View RelatedI'm scaling markers on a MapView with the following code
CODE:.........
And:
CODE:.............
Which works, but the shadow below the marker has wrong offset when scaled. Also; i override the public boolean onTap(int index) in ItemizedOverlay to detect taps on the markers, but it seems inaccurate. I can click some range outside the marker and still trigger onTap...
I'd like to know if there is already a way to know from a given set of markers, the zoom I should apply to the map or do I have to do it my self? (this depends on the resolution so i expected to find it in MapView because it knows its boundaries.
View 4 Replies View RelatedI'm trying to draw on a map using markers. The problem I'm having is when I try to add lots of them, then I can't get it to run. To illustrate my problem, let's say I want to draw a square made of 900 smaller squares (30x30).I'm trying to add the markers to an itemizedoverlay, then drawing it.
Code:
public class MyItemizedOverlay extends ItemizedOverlay{
private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>();
private Context mContext;
[code]....
I'm currently developing an app for Android which uses google map service. Because users will be able to see thousands of markers I would like to load only those which are currently within the map bounds (i.e. when user look at specific map tile). I know how to do it with javascript/html. However, Android doesn't seem to provide any similar methods such as containsLatLng(latlng) or getBounds (I only found getLatitudeSpan and getLongitudeSpan, but don't know how can I use them in order to achieve the similar effect). Can anyone give me some hint on that?
View 4 Replies View RelatedI am currently working on a video player using the VideoView and I am controlling it with the MediaController.
The first thing I would like to do is to be able to place markers along the seekbar, such as 25% of the clip. I want to fire an event when this mark is hit or scrubbed past. Throwing an event when this marker is hit with the video playing regularly will be easy because I should be able to just use getCurrentPosition and checking to see if it is 25% of the total clip. The issue I am having is how to fire the event if the user scrubs past the 25% point.
The second thing I am trying to do is just show a visual marker along the seekbar that I can display a marker, lets say at the 25% point, 50% point, etc.