Skip to content

Changing center coordinates

Robert Peters edited this page Oct 25, 2013 · 1 revision

The Core does not contain functionality. Therefore, if you change the center coordinates, you have to update the distance and bearing of the cache from the center location. This is typically how it is done:

            Core.CenterLocation.SetLocation(lat, lon);
            Core.Geocaches.BeginUpdate();
            foreach (Framework.Data.Geocache gc in Core.Geocaches)
            {
                Utils.Calculus.SetDistanceAndAngleGeocacheFromLocation(gc, Core.CenterLocation);
            }
            Core.Geocaches.EndUpdate();
Clone this wiki locally