added latlon field cached ids and added a few const keywords