Question: ```
<marquee style = "color: Red; font-size: 24px;">

<?php for($i = 0; $i < 50; $i++) 

{ 
    echo $symbol[$i]; 

    echo "\t"; 

    echo $chng[$i]; 

    echo "\t\t\t"; 

}?>

</marquee>

```

I need to change the color of text based on the value of *$chng[$i]*. i.e. if $chng[$i] > 

0.. green, else red.

Answer: 
I used the `CLLocationManager` delegate update methods to get the current location about every second, saved the previous location and interpolated between those. It's a little more effort, but t makes the tracking a lot smoother. Here is my code:

```
#define zoomSpan MKCoordinateSpanMake(0.001f, 0.001f)

@property (strong, nonatomic) CLLocation *lastLocation;
@property (strong, nonatomic) MKMapView *mapView;
@property (strong, nonatomic) CLLocationManager *locationManager;

...

- (void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{
    CLLocation *currentLocation = locations[locations.count - 1];
    // Set to last location, for faster setting to correct position
    [self.mapView setRegion:MKCoordinateRegionMake(self.lastLocation.coordinate, zoomSpan) animated:NO];

    // Locations in-between coordinates for smooth tracking
    CLLocationDegrees deltaLat = currentLocation.coordinate.latitude - self.lastLocation.coordinate.latitude;
    CLLocationDegrees deltaLon = currentLocation.coordinate.longitude - self.lastLocation.coordinate.longitude;
    NSArray *locationsArray = @[[[CLLocation alloc] initWithLatitude:(self.lastLocation.coordinate.latitude + deltaLat * 0.2)
                                                           longitude:(self.lastLocation.coordinate.longitude + deltaLon * 0.2)],
                                [[CLLocation alloc] initWithLatitude:(self.lastLocation.coordinate.latitude + deltaLat * 0.4)
                                                           longitude:(self.lastLocation.coordinate.longitude + deltaLon * 0.4)],
                                [[CLLocation alloc] initWithLatitude:(self.lastLocation.coordinate.latitude + deltaLat * 0.6)
                                                           longitude:(self.lastLocation.coordinate.longitude + deltaLon * 0.6)],
                                [[CLLocation alloc] initWithLatitude:(self.lastLocation.coordinate.latitude + deltaLat * 0.8)
                                                           longitude:(self.lastLocation.coordinate.longitude + deltaLon * 0.8)],
                                currentLocation];

    float timer = 0;
    for (CLLocation *nextLocation in locationsArray) {
        [self performSelector:@selector(updateMapCenterLocation:) withObject:nextLocation afterDelay:timer];
        timer += 0.2;
    }
    self.lastLocation = currentLocation;
}

- (void)updateMapCenterLocation:(CLLocation *)location
{
    [self.mapView setRegion:MKCoordinateRegionMake(location.coordinate, zoomSpan) animated:YES];
}

```

Make sure that the class you are using this in (normally the view controller that holds the map view) is set to the `CLLocationManager`'s delegate and implementing the `CLLocationManagerDelegate` protocol.

Some additional comments:

* The behavior of this code is similar to `MKUserTracking`, but this doesn't support custom set zoom levels. There seems to be a bug resetting the zoom level when starting tracking, therefore this workaround.
* `zoomSpan` is currently fixed, but you also can use the span of the current region with `self.mapView.region.span`.
You could also try this:

```
- (void)adjustRegion:(CLLocation*)location {
    MKCoordinateRegion viewRegion = MKCoordinateRegionMakeWithDistance(location.coordinate, 150.0, 150.0);
    MKCoordinateRegion adjustedRegion = [self.mapView regionThatFits:viewRegion];
    [self.mapView setRegion:adjustedRegion animated:YES];
}

```