How to do inverse overlay on google map? - android

I want to develop the above picture in android, which is already implemented in iOS.
I know how to add circle on google map. but as shown in picture the color should be filled on map not on the circle, circle must be fully transparent.

you can achieve what you want by using the google MapView (instead of a Map fragment) and adding another image on top of this map view.
having said that, do note that what you want is against the google maps usage terms and services.
(https://developers.google.com/maps/terms)
8.4 b. Restrictions. In using Google Brand Features, you will not:
viii remove, distort, or alter any element of a Google Brand Feature (including squeezing, stretching, inverting, or discoloring).
8.5 Proprietary Rights Notices. You will not remove, obscure, or alter any proprietary rights notices (including copyright and trademark notices, Terms of Use links, or Brand Features) displayed or provided through the Service. Where such notices are not displayed or provided within the Service, you must display such notices according to the Maps APIs Documentation.

I have a good solution for your problem.
You can use an image which has a transparent circular area in the middle. Overlay the image on the map by using Relative Layout or FrameLayout.
That overlay will result in the map showing only in the middle circle.

Related

Android and iOS HERE maps Possible to show traffic on top of Polygon?

Using HERE Javascript SDK, traffic appears underneath of the polygon
I'm hoping that the HERE Android and iOS SDKs will be more powerful and allow me to achieve traffic (some road + text) on top of polygon like what I already achieved with Google Maps Android SDK:
Can I?
"You can use the setOverlayType(MapOverlayType) method to set the display layer for the map object. By default, map objects are assigned to the foreground."
(https://developer.here.com/documentation/android-premium/topics/map-objects-and-interaction.html)
So, set your mappolygon MapOverlayType to background or something behind ROAD_OVERLAY (see all options here: https://developer.here.com/documentation/android-premium/topics_api_nlp_hybrid_plus/com-here-android-mpa-mapping-mapoverlaytype.html#topic-apiref)

Overlay image google maps

In my app I added the map of Google Maps and you can navigate within a given area (which can not be done through maps as it is not drawn). Now I would like to customize the map and add image overlays to the buildings so as to better target people. Let me explain with an example:
In the picture is the image of the building that I customized.
Now I want place the image over the google map. I saw that there GroundOverlay but I can not place it properly.
Does anyone have any tips?
I would recommend using Polygon Shapes instead of Images. Working with Images like you intend to do, would probably be very hard later on.
You might want to look at:
https://developers.google.com/maps/documentation/android-api/shapes

Make android google maps polyline appear above street names?

How to add a polyline to google map in android above street/area name?
I think this is not possible in an easy way due to how google maps API handles the "background".
If you set the background to normal or hybrid, the map is drawn as a background either in road view like your screenshot or in satellite view if hybrid is selected.
Then all the users features are drawn (and eventually overlays, lines, poligons, then points and lastly, street names. You can't really change this, but you could do a trick:
- Use just the satellite view (so no roads will be added).
- Remove the google background and add an alternative one (there are different services like Open Street Map, Mapnik ecc that allows it).
Following the second choice could also allow to add googlemaps background from web api, but I really don't advice to do it, since you are downloading tiles in a non standard way for google.

How do take an existing map and overlay it into google maps on the android platform?

I am working on making a interactive campus map. I am wanting to take an image (below) and overlay it onto Google maps and then add interactive points of interests. I am not seeing how to add or merge the image to the map. Can this be done? Are there any examples out there I missed?
If you want to replace the google map background.
From my experience, I could say no. It can't be done
But if you want to make it like transparent you can put Your map on top of google map and just set transparent.
However, somebody already been done this before. you might got some idea if you see this
http://www.maplib.net/
http://lifehacker.com/213627/embed-any-image-into-a-google-map
Google Maps Developer Documentation

How do i implement falling pins animation for markers in android map view

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);

Categories

Resources