Android :: Add Markers To A Google Map On Droid?
Aug 4, 2010I'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?

I'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?
I 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 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 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 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...
I 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 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'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 the following code and the markers are not appearing on the map at all! code...
View 1 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.
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...
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'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 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.
I am trying to get the images to have transparent backgrounds so the map is not blocked by a square marker with an image in it. What image editor and what settings should I use to get this to work?
I am trying to do some custom backgrounds for buttons and the same problem comes up: I get square corners and a background that does not scale with the buttons.
I think this all part of the same problem: I am not using the right tool with the right settings to create the images. I must be misinterpreting the documentation and examples that talk about a white border around the image and a black line along the top and left side for the expandable button background.
Here's a quick way to reproduce the problem:
Follow the directions to create the MapView program as described on:
http://developer.android.com/resources/tutorials/views/hello-mapview.html
For the icon I first used the image copied from the page:
Next I edited the picture in Microsoft Paint, and cut off the little guy's antennae. I'm not cruel and no real androids were harmed in that experiment. I surrounded the new picture with a pixel thick border of white, copied from the border that was around the rest of the image, and then copied the black that was there as well in the void areas of the image, outside the border.
I saved the image as myandroid.png and copied the file to the layout folder. Pointed the activity to the new pic and ran the program.
The image was displayed with a full square background and shadow, not the android shaped image and shadow that was there when the original image was used.
Custom Button background:
Follow the directions for the Relative Layout example at:
[url]
Next, I created an image to expand as a background for the button called backbutton.png. It too is surrounded by a white border and black filled on the corners, the top and one side per documentation I found in "Android Programming Tutorials" on page 298.
The background does not expand, nor do the corners round.
I wish I could show you screenies of what I have.
How do you create the images for the custom backgrounds and the images for the custom map markers and buttons? I need to know what image editor to use and the file attributes to set, so the images expand and display with the proper void spaces in them.
A few months ago Google sent top market developers a feww phone (Droid or Nexus).I was one of them and received a Droid.I just now called in to activate the Droid on my Verizon account and was told that it is not activated.They said that the ESN number is tied to a business account and currently active.Verizon said the only thing I can do is to contact Google, who sent me the phone, and work it out with them.The paperwork with the phone came with no numbers or email addresses.I have tried calling the Nexus support line, they could not direct me anywhere. I have tried emailing the automated robots that sent me emails about the phone.Is there anyone at Google that I can contact that would be able to help with this?
View 2 Replies View RelatedLots of people underestimated Apple and thought Android phones were ahead of the game. Judging by this video, it seems like a tie if not Apple has the race still won. I mean, the fluidness of iPhone is just amazing, which honestly makes it look more intriguing.
View 10 Replies View RelatedI'm running Cyanogenmod 6. I just noticed that I can't find Google voice or Google maps in the market. I do have the apps installed, but can't see them int he market to get updates. I tried out LFY1.7 and Ultimate Droid 1.0.0, and see the same issue.
View 5 Replies View RelatedI have a Google Calendar account that I log into with my yahoo email address. On this calendar I also can view my calendars of other family members.The problem I am having is that I had to create a google account when I bought the phone. However, I can't seem to get my non-google calendar to show up on the phone.I have tried using my new google account to "friend" my non-google calendar account but it's still not showing up.
View 4 Replies View RelatedGoogle Phones were handed out to all Google employees. The phone is apparently going to be sold directly by Google and apparently available in January. I'm not sure who the attorneys for Verizon are, but Google must have done some deft negotiations to be able to pull this off. They just shafted Motorala, Verizon - and us - in the butt. I'm pretty sure, post Christmas, Droid updates and fixes will become non-existent as Google focuses on their own offering. Google is indeed Microsoft with a crayola logo.
View 38 Replies View RelatedWhen I had Google Latitude on my Crackberry it updated my location on a timed interval in the background, on the Droid X it only updates when I open the Google Map app, is there anyway to have it update in the background?
View 1 Replies View RelatedI have searched around for an answer to these two issues, but haven't been able to find anything. After doing the manual upgrade to 2.1 OTA, most everything is fine. However, Google Voice and Google Listen are having issues. Google Voice is giving me a Force Close message every time I receive a text message in Hand cent SMS (to my non-GV number). I don't actually use GV on my voice all that often. Google Listen seems to have lost all trace of any of my pod casts, including new ones that have come in since the update. Every episode on every pod cast has, just under the title: "Error (sd card/com.goggle.android.apps.listen/downloads/e55bee71)" The string of letters and numbers on each one is different. I used Astor File Manager to look in this folder and each of those files is not there. Some of these folders were downloaded a month ago (I'm a little slow in getting to some pod casts) and some I have listened to already pre update but still getting the error now. Some that I have listened to are not giving the error. And any that were downloaded after the update are giving the error.
View 7 Replies View RelatedI've seen references to using the AccountManager like http://stackoverflow.com/questions/2245545/accessing-google-account-id-username-via-android but it seems like it's for grabbing the authtoken?
I just need access to the username, no passwords or any auth tokens. I'm using android 2.1 sdk.
I am new to android. I parsed the calendar file. I need to add events to Google calendar from my application. I am using eclipse ide. In eclipse how to use the Google calendar api? Any jar file is needed to use the calendar api?
View 1 Replies View RelatedI greatly prefer using apps like the telegraph news program over googles mobile versions why aren't their dedicated apps for Reader and News?
View 6 Replies View RelatedIs Google Latitude available in the UK or not, because it doesn't seem to be working for me? I have received the RC9 update for G1 and have Google Maps 3.0. Is there an a Google Latitude application that I should have or do I access everything through Google Maps? When I go the www.google.com/latitude on my G1, it offers me the option of "launching" Latitude but it just takes me to Google Maps. From there, I cannot see the locations of my Google "friends" (who have agreed to show location), neither does my own location show up on the Latitude homepage on the web (I have settings turned to "detect my location automatically").
View 13 Replies View Related