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: 
'hi Jak

I've tried to solve this as well but it looks like MKMapView might be using some fancy stuff between updates to predict the next position and make the movement smoother.

If you look at the way they handle the compass they are doing a lot of filtering as the raw compass data is not terribly steady so they make it really slick and smooth.

Also, notice when tracking you can zoom but not pan. I've failed to replicate this functionality in my app even with scrolling turned off, it still scrolls when you are zooming if you pan your fingers around.

I guess they don't expose everything just to keep ahead of us :)
D
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`.