WordPress does not include any geographic functionality or functions to deal with Geodata itself (something that might be called a Geodata API). But there is a standard for how to store geodata, so that plugins can interoperate.
Where to store Geodata ?
Geodata for an object should be stored in the metadata for that object.
- Geodata for posts, pages and other post-types should be stored in postmeta.
- Geodata for users should be stored in usermeta.
- Geodata for comments should be stored in commentmeta.
Meta keys and their meta values are listed below.
- (float) decimal degrees -90 to 90 (negative values are in the southern hemisphere).
- (float) decimal degrees -180 to 180 (negative values are in the western hemisphere).
- (int) is the geodata public (1) or private (0)? If value is missing, assume public.
- (string) freeform textual description of coordinates.
- "221B Baker St, Westminster, London NW1 6XE, UK",
- "Pasadena, CA", "Soho, NYC", "Idaho", etc.
- Accuracy level and language is arbitrary.