Change User Location Blue Pulsing Circle Radius - ios

Is it possible to change the radius of the blue pulsing circle around current user's location in MapKit? I have an application which looks around current location for points of interest within a certain radius. I'd like to show this circle to the user without having to completely provide a new annotation for current user location. Any ideas?

This radius signifies the GPS's inaccuracy. I don't think you can override its behaviour.

Take a look at the Mapbox iOS SDK, which is open source and allows you full access to this component. In MapKit, you can only change the tinted user dot, but not the circle.

Related

Change color of googleMaps current location icon/marker

I am using googleMapsApi in a swift project. I was wondering if it is possible to change the color of the marker or icon that shows the users current location. I understand how to add a custom marker with images, colors, shapes etc.. but the default current location marker that is blue can I change to be red or any other color?
No, there is no official way to replace the blue current location dot in GMSMapView.
The only way to achieve this is by removing the blue dot by setting mapView.myLocationEnabled to false and then create a custom GMSMarker with the design you want and place it on the current location position on the map.

Objective-c, Google Maps draw a polygon within radius of 50 Kilometers from my current location

Hope all are doing well.
In an on going project, am using Google Maps and need to draw an overlay like the below attached image, where the overlay covers the radius of 50km region from my current location.
Appreciate your help, I've tried few links which show same like
Inverted Polygon in GMSMapView

MapKit MKCircle Change Radius on Zoom Level

I'm trying to create an MKCircle overlay on a map, however I would like the size of the circle on the screen to remain constant as the user zooms.
So as the user zooms in, the radius gets smaller and as the user zooms out, the radius gets larger.
I'm working in Swift 3. Is there a specific MapKit method I should be using to accomplish this? I know there is an option to use an image of a circle as an annotation, however I want to dynamically change the color of the circle.
In other words, I want the MKCircle to scale the same way an MKPolyline scales as you zoom in and out
So as the user zooms in, the radius gets smaller and as the user zooms out, the radius gets larger
An MKCircle would presumably be part of an overlay (MKOverlay). An overlay works by simulating drawing on the earth itself. Thus, the drawing changes with the zoom level.
So if you don't want that to happen, don't use an MKOverlay. You could, for example, just make a normal view that displays a circle and lay it in front of the map view. Or you could use an annotation instead (MKAnnotation); an annotation's image does not change size as the map is zoomed.

How to determine if user is on same road as GPS coordinates

I have an GPS based iPhone application that uses Google Maps. The app simply displayes the users current location on the map and will alert users when they come to within a certain radius of a marked Point on their journey.
For legal reasons I am unable to use turn-by-turn navigation in the app so the app will never know the route the user is taking to get from A to B. All the app does is constantly check current location agains a database of GPS Point coordinates. If the users current location is within e.g. 50 meters of a Point, the user will get a message regarding that Point.
My issue is this:
Each Point has a radius of say 50 meters around it as marked by the large blue circle on the image below.
The user is indicated by small blue dot and the direction of travel is marked by the red arrow. In the image the user has entered the radius of the Point but is not actually on the same road as the Point. The user should only get messages should they be on the same road as the Point and within the radius of the Point.
Is there a way I can determine if the user is on the same road as thePoint when entering that Points radius?
Side Note: The app is working in its current state and I can get messages when entering the radius of a Point.
I have been implementing gps based track and trace apps for a while. The easiest way I see is when you get the event that the point is entering the 50 m radius you do a geolookup meaning you ask the system the address of the long/lat. You compare this (street) with the geolookup of your ref point.
This requires a geolookup service and the user being online.
Instead of using a circle, you should use a rectangle defined when creating each point. Or use both: test rectangle of the street once inside the circle if your rectangle is too approximate. You can find out approximate edges of the rectangle by testing geolookup different point of the circles at the beginning.

MapKit uber style map Center annotation

I would like to have a annotation in the center of the map, that does not move when the region is changed. That is, when one moves the map, the annotation stays in the center regardless. I have implemented this using NStimer, assigning the map center coordinate to the annotation every .001 seconds, however this is very choppy and doesn't look smooth.
I realize that I need to use an Overlay than convert the overlay annotation to coordinates on the map.
Pretty much it would look like what Uber has.
THe other solutions for this that I have seen have not used a normal annotation. Instead they put another view over the top of the map with the annotation image in the middle. It doesn't matter what happens to the map the view stays centered on the screen and if you do ever need to interact with it, you just ask the map what the center coordinate is at that time.
You can get the code from the following link:
https://github.com/scottrhoyt/CenterPinMapViewController

Resources