cannot find an answer in the official documentation, so is there a way do have a GoogleMap draw marker shadows automatically like the old MapView did?
i know i can draw it manually but i'm wondering if that handy behavior is still there
As far as I can read, google and research the answer is no. You could do something in code to automatically create it etc. but I think the best option is to draw it.
Related
I need to make an Android app where the users have an option to draw a polyline on Google Maps and when the touch is removed, then do some action with the plotted polyline. Drawing and performing action is secondary. But the question is how could I achieve this?
Is there any predefined drawing tool (something like http://googlegeodevelopers.blogspot.in/2011/11/make-your-map-interactive-with-shape.html for JavaScript) to be used in google maps, or do I need to go with customization? Please suggest, or provide any links.
And can we extract the points to compare them with the ideal answer which was to be traced?
But the question is how could I achieve this?
With code. ;)
do I need to go with customization?
Yes. You would have to code all the functionality yourself. AFAIK there is no library that does that and of course Google Maps Android API v2 doesn't (and most probably won't) provide such functionality because it is too specific. I still think this would make a pretty useful library.
And can we extract the points to compare them with the ideal answer which was to be traced?
Yes. That would be simple after you are done with everything else.
Polyline polyline = ...
List<LatLng> extractedPoints = polyline.getPoints();
Simply use google maps api Google map API v2 following link might help you with the code.
code reference
I just want to touch the screen, use a listener to detect and add a marker at the location touched and allow the user to add written information to the marker. I done this a while back using the now deprecated API, after a long time searching SO, all I see on markers and V2 API is how to animate, add custom markers, or shadows, all beyond what I need to know. I read through the documentation at Google for a good while and got lost.
It seems that basic stuff is hard to find. I would just like to know if this is possible, and a few pointers on how it is different in V2.
Thank you!
I would just like to know if this is possible
I don't see why not.
and a few pointers on how it is different in V2
Implement an OnMapClickListener and attach it to your GoogleMap via setOnMapClickListener(). Your onMapClick() method will be called when the user taps on the map. There, add a new marker. AFAIK, this should work just fine.
Not really sure how to explain this easily, but here goes. I want to make a highlight overlay on the whole Google Map in Android, except one rectangular are which would stay as default. Basically, the opposite, inverted version of this:
Drawing area at Google Map
Any ideas how to configure this?
Thankyou in advance,
Alex
P.S
Just to keep clear, the example for Javascript is just for picturing purpose, I need this for regular Java :).
Have a look at this Masked Polygon library for Google Maps. https://github.com/vasile/Mask-KML-polygons
Is there a way to make a marker on the MapView bounce? I mean already provided by the mapview (like the web google map).
Or I'll have to write my own code for animation for this?
Unless it's been added recently to the Maps API, I believe you'll need to do the animation yourself. There's a similar question here that may help you.
Is there any way to implement falling pins/markers animation for google maps in android like that in iPhone ???
Android has overlay markers (see ItemizedOverlay) that make it easy to add images to maps, BUT note that, in my experience at least, animated images do not work when added to overlays.
I found it necessary to add a View on top of the MapView, and add imagery to that, and I've successfully added animated drawable images to the map using that approach. For more details see here:
Can I use AnimationDrawable in an overlay on a MapView?
But to be honest, you should remember that it's Android, and copying every little feature from iOS is unnecessary. Google Maps on Android doesn't use a pin marker, it uses a static blue spot - I'd say it's best to replicate that and remember your users are Android users, not iOS users - they want consistency across Android apps.
You could have a look in this docmentation: https://developers.google.com/maps/documentation/javascript/overlays
Here is an example map.
Just add this in your code:
marker.setAnimation(google.maps.Animation.DROP);