1

I want to develop below picture in android, which is already implemented in iOS.

enter image description here

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.

i have referred many links but all of that put the simple overlay on map, so when user zoom in or zoom out the map; circle remains the same.

i have implemented simple circle around current location.

    googleMap.addCircle(new CircleOptions()
            .center(new LatLng(MyApplication.latitude, MyApplication.longitude))
            .radius(800)
            .fillColor(0x70ffffff))
            .setStrokeWidth(0);

i want above functionality with inverse color. circle should be only around current location and the size should vary with zoom in and zoom out of map.

Thanks.

mehrdad khosravi
  • 2,228
  • 9
  • 29
  • 34
Ronak Thakkar
  • 79
  • 1
  • 13
  • Take a look at http://stackoverflow.com/questions/35647057/android-google-maps-inside-circleview/35648839#35648839 – antonio Jul 07 '16 at 20:05
  • i have already implemented it. but its just the simple overlay, circle size is not getting vary when user zoom in or zoom out the map. – Ronak Thakkar Jul 08 '16 at 04:14
  • Do you need to scroll (pan) the map and move the circle accordingly or just zoom? – antonio Jul 08 '16 at 10:34
  • i need the circle exactly like google map provides by above code, but the only requirement is to fill the color out side the circle(on map) and circle should be transparent. 1) circle should 800 meter only around current location. 2) it will get smaller and bigger as user zoom out or zoom in the map – Ronak Thakkar Jul 08 '16 at 11:33
  • You can also take a look at my answer here http://stackoverflow.com/questions/36030648/custom-disabled-and-blank-map-in-android/36039979#36039979 – antonio Jul 08 '16 at 13:40
  • @antonio : i have seen your answer that is good, but couldn't match with the requirement. can you pls look at this http://www.vasile.ch/hacks/ft-mask/ i need like this. in which specific are is getting highlighted and user can also zoom in and zoom out the map. – Ronak Thakkar Jul 18 '16 at 10:30
  • here is one another question but it's in ios. i need the same in android. http://stackoverflow.com/questions/9049790/add-inverted-circle-overlay-to-map-view Thanks for your time :) – Ronak Thakkar Jul 18 '16 at 10:41
  • look at this answer... it is so simly and does exactly what you need: https://stackoverflow.com/a/45525627/3604955 – kaiser Jan 18 '18 at 00:34
  • https://stackoverflow.com/a/42509627/9949259 – lincollincol Aug 13 '21 at 16:28

0 Answers0