0
votes

I've found this post how to draw circle overlay around location

Draw a circle of 1000m radius around users location in MKMapView

I'm able to set some color, or transparency or whatever for overlay. but I'd like to do the same for rest of the map area. F.e outside circle overlay sort of "terra incognita"

One possible solution in my mind is:

  • get circle coordinates, radius
  • create UIView overlay above mapView with shadow and blur radius respectively to mapView circle

simply saying I'd like to have something like this:

enter image description here

Any ideas how to achieve this?

1
you should create an overlay image on the fly, I guess, and you can use that as overlay for the map, but that is kinda tricky, because probably you cannot cover the entire world outside of the 1000m circle, so visually you need to add some gradient to the blur as well so it can fade-out nicely by the edge of the overlay image, when the map is scrolled.holex
Similar: stackoverflow.com/questions/20724267/…. Basically, you would not add any overlays to the map itself. (The android-mapview tag on the question doesn't make sense.)user467105

1 Answers

0
votes

I think you're thinking right. Howbeit, for make a blur background u need make screenshot and calculate blur with library GPUImage for example.