implement fog(blur) in map - ios

i will try to last some days but not getting any idea to how can i solve this.here are some screenshot
when first time screen display than only userlocation is display in map and other map is blur but when user can move to another position than clear each position blur effect like my second screenshot
please give me some logic how can i solve this.

Related

MKAnnotation is not moving with map after update the position

On first time load, it's working fine and move along with MapView, but if I change the marker position and then if I drag the map view that marker is not moving with map.it's just stuck on that place. It's only happening in iOS 11 or below that version.
See the  screenshot its just stuck  that place.moving mapview.
I don't know that this will work, but you can change coordinate of annoation use
[yourAnnotation setCoordinate:newCoordinate];
Pls see if this SO question helps you MKMapView moving Annotations Automatically - animate them ?

How to keep an MKAnnotation View Image fixed on the center of the map as the user pans and moves the map around (Swift)?

using target 8.0 MapKit, I would like to define an MKAnnotation (such as a pin, or a custom one) that remains fixed on the center of the map view as the user moves the map around. Once the user stops moving the map, I would like to be able to read the new coordinates of the annotation. How can I do this? This in swift, thank you soo much
You can follow this link to accomplish this task.They are doing something very similar to your requirement. Its quite descriptive. Link

How to limit panning and zooming in-out area?

in my app i am having one image view which contains the picture of user taken from either camera or phone library(album).And the user is allowed to select some product from a list of products for trying on his picture. I am able to do all this stuff and also i am able to do the panning, zooming and also rotation on the product. But my problem is, when i am moving this product it is going out of the image view that contains the users picture and same thing happening with the zooming ..Please help me through this..Thanks in advance..
You need to restrict it in the frame of outerview.
so CGRECT methods can serve your purpose.
such as
CGRectIntersectsRect
CGRectContainsPoint
for reference see this
and for zooming purpose see this

snapshot/screenshot with MKMapview

I am trying to make a snapshot from a view with a MKMapview to provide a springboard like folder animation when the user selects an annotation.
The official way to make a snapshot of the current window is presented here. This works fine (though quite slow) unless the mapview is not zoomed in too much and has a "regionThatFits" set. The map & the marker make an unmatched "jump" to the left and the gridlines of the mapview are visible:
Before screenshot:
After screenshot:
I suppose it has something to do with the tiled parts of the map but I don't know how to prevent that behaviour.
Any thoughts?

Adding Custom Image on Mkannotationview, or on callout bubble?

i'm trying to reproduce the kind of map behavior of the app "Stuck On Earth". Here's a screenshot :
Here's the behavior :
On the map, as you can see there is pin
When you click on a pin, it display the picture attach to it. Really important : the picture stai with the pin, and it stays BEHIND it
If you click on the picture, a new controller is called
if you click on the pin, the picture disappear
I'm trying to do something similar. For now, as i can read, i've got two solutions :
Using callout : callout is HELL. I can try to use a false annotation, but MapKit deals with the depth of elements, and the picture is always in front of the pin
Using Custom Annotation : i was going for the plan of making custom annotation view, when the pin is tapped, i launch a method of the CustomAnnotationView, adding (or removing) the thumbnail.
I think the method number 2 could work, but i've got no idea how to deal with the touch on the thumbnail.
Any suggestions or help on this ?
Thanks you !
Updated 2016-09-02:
My colleague devised an workaround by making popup views as subview of the view container which contains the map view. The position can be calculated according to the CGPoint transform in different reference systems.
Original Answer:
I also got this kind of problem, after following the tutorial 'Building Custom Map Annotation Callouts – Part 1', the interaction becomes difficult.
Have you tried the tap gesture recognizer? I added it to a subview, it works, although the code smell bad.

Resources