Google Maps not showing details - android

I have an android app that is supposed to track an order that is in a certain truck at a given time .Am using the google maps android api for this , my problem is that my map is not detailed enough to show without much effort where the truck is? Could this be an issue with the plan am using ,because am using the standard plan or what might be the issue. i know its a simple question but am not so sure what is happening,thanks in advance.

So if i get it right, your map is already working, but its not detailed enough? You can switch your View to Satellite View like this:
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
And if you increase the zoom, you get a more detailed View, for Example:
// Move the camera instantly to yout specific location with a zoom of 17.
mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(latlng, 17));

Related

Android: Marker on StreetViewPanoramaView

I show on my Android App a map with stores on its location with the posibility to see the street view.
I want to show the store's exact location in the street view, so, Is there a way to add a marker on StreetViewPanoramaView?
I know that it is possible on Web with Overlays within Street View but I don't find anything for Android.
Thanks.
Yes, it is possible on Web and IOS. However, its not available for Android platform. This is more likely a feature request.
I found this blog which shows how to display StreetViewPanoramaView with markers. You can use this as a work around: http://android-er.blogspot.com/2015/11/display-streetviewpanoramaview-in.html

How does Google Maps Android API v2 decide the order of coincident markers?

I've looked through all the existing questions on this topic and while many say there is no way of changing the z-order of markers on Google Maps (Android API v2), I was wondering how Google Maps decides the order itself.
I should specify that by 'order' I mean the order in which Marker InfoWindows are presented when a stack of coincident markers is tapped multiple times.
My requirement is not to change the order, only predict it so that I can add a snippet to the info window e.g. "1 of 2...".
From what I have observed, the order has nothing to do with the order the markers themselves are created or added to the map. Or even their content as the order seems to vary each time the map is initialised with the same content.
I'm using the MapFragment in case that makes a difference. I haven't posted code because I don't think it sheds any light on the issue. I have used Log calls to ensure that the order that the markers are added is the same every time.
Thanks for any help you can give, if the answer is simply "it is random" then I already know a more complicated way I can achieve what I want, I was just hoping to avoid the extra work.
If you mean that two markers share the same LatLng position, then it might be random as you said. If they are very, very close to each other, it is from my observation that visible marker is the one with bigger screen position y value. Even if that value is subpixel.
Anyway you should avoid having markers on the same position and I can suggest two clustering solutions: Android Maps Extensions and Clusterkraf.

Map View getting Location

I'm using a Map View and I'm able to get the current location. but now my problem is I want to put a marker on the specific place that near me. for an example I want to put a marker to all the Starbucks that near to my current location. I don't have any idea how to do this. Any thoughts will be appreciated.
There are innumerable examples of using Map Overlays on Android. Here is one of them. Just take the locations you have and do put them in this code:
Map Overlay Example
If you are asking how to get the locations of the things you want to put on the map, then you are going to need to use something like the Google Places API with documentation found here:
Google Place API Docs

Real time Traffic on Map View in Android

I am developing an app with Map View. I had implemented Overlays for Map view referencing from
http://developer.android.com/resources/tutorials/views/hello-mapview.html
which works perfectly. Now, I want to show Real-Time Traffic as Google shows. I had also set the map view property mapView.setTraffic(true); My App is showing like below,
Is it all that to be done or is it possible to show like below
I am looking for some sample, links or tutorials on this. please guide me for the same.
Thanks in advance...
Panache
The second image is what is called a 'street view'. Google does have an API for this but you're limited to 1000 per viewer Google's quota and its just an image so wouldn't be in a Android Map View.
See here: https://developers.google.com/maps/documentation/streetview/ for more details.

Google maps link produces slightly moved marker when opened with native iphone/android app

I am building a web app which contains a Google Maps link that can be opened by the native phone Maps app (iPhone/Android).
The link has the form:
http://maps.google.com/?q="+startCooLat+','+startCooLng;
and I have also tried the:
http://maps.google.com/?q=loc:"+startCooLat+'+'+startCooLng;
However in the native app the marker is positioned in the nearest street and not in the exact coordinates that I am giving. Is there a solution or another parameter to set so as to overcome this issue?
Instead of questioning (q=.....) google maps for the location, in which it returns what it thinks is the nearest human address to the location (somewhat annoying I think) you can pass a lat lng location where you want the center of the map to be. For example:
http://maps.google.co.uk/?ll=53.385517,-1.865315
Instead of:
http://maps.google.co.uk/?q=53.385517,-1.865315
I had this problem my self, and on my Android device at least this works. The second example simply puts the map on a road, the first is in the middle of the moors on the device in the maps app.
The full link from the comments:
http://maps.google.com/maps?ll=53.385517,-1.865315&q=loc:53.385517,-1.865315&t=m
This one seems to work at adding a marker for the standard maps app whilst still adding a marker.
After receiving a recent answer to an old Android Google Maps question I had, I have found another solution to this question, which I thought would be useful for others. Original Question - and credit to Captain Charmi for pointing me in the direction.
Instead of using the link above which will create a marker at the given location, trouble is, the maker is pretty meaningless, just the coordinates. If you use the following link, you can add either a title to the marker and show the coordinates:
http://maps.google.com/maps?q=53.385517,-1.865315+(My Random Location)
Or you can instead of adding a title, you can supply text to go inside the marker:
http://maps.google.com/maps?q=A pot of gold at the end of a rainbow#53.385517,-1.865315
As you can see, Google now drops the marker in the correct place due to being supplied the info for the marker. I hope this helps.

Categories

Resources