OpenActive Developers
Data ValidatorDataset DashboardW3C Community Group
  • Welcome to our community
  • Publishing Data
    • Data Feeds
      • How an RPDE data feed works
      • Types of RDPE feed
      • Implementing RPDE
      • Testing RPDE feeds
      • Scaling RPDE feeds
    • Activity list references
    • Including geo coordinates
    • Schedules
    • Dataset Sites
    • Virtual Events
    • On-Demand Events
    • Opening Hours
    • Data Quality
  • Using data
    • Harvesting opportunity data
      • Large Integers in JavaScript
    • Tutorial: Consuming an RPDE feed
    • Attribution
  • Open Booking API
    • Key Decisions
    • Implementing booking
    • Testing booking
      • Configuring Test Suite
      • Implementing the Test Interface
        • Test Interface Actions
        • Create Opportunity Endpoint
      • Random Mode: Generating Test Opportunity Data
      • Running Test Suite
      • Generating the Conformance Certificate
  • Data Model
    • Data Model Overview
    • @context and JSON-LD
    • Types Reference
      • Action
      • AudioObject
      • BabyChanging
      • Barcode
      • BookingService
      • BooleanFormFieldSpecification
      • Brand
      • ChangingFacilities
      • ConceptScheme
      • Concept
      • CourseInstance
      • Course
      • Creche
      • CustomerAccount
      • DataCatalog
      • DataDownload
      • Dataset
      • DropdownFormFieldSpecification
      • DynamicPayment
      • Entitlement
      • EventSeries
      • Event
      • FacilityUse
      • FileUploadFormFieldSpecification
      • GeoCoordinates
      • HeadlineEvent
      • ImageObject
      • IndividualFacilityUse
      • InternalApplicationError
      • InternalLibraryConfigurationError
      • InternalLibraryError
      • Lease
      • LocationFeatureSpecification
      • Lockers
      • MediaObject
      • OfferOverride
      • Offer
      • OnDemandEvent
      • OpenBookingError
      • OpeningHoursSpecification
      • OrderItem
      • OrderProposal
      • OrderQuote
      • Order
      • Organization
      • ParagraphFormFieldSpecification
      • Parking
      • PartialSchedule
      • Payment
      • Person
      • Place
      • PostalAddress
      • PriceSpecification
      • PrivacyPolicy
      • PropertyValueSpecification
      • PropertyValue
      • QuantitativeValue
      • Schedule
      • ScheduledSession
      • SessionSeries
      • ShortAnswerFormFieldSpecification
      • Showers
      • Slot
      • SportsActivityLocation
      • TaxChargeSpecification
      • TermsOfUse
      • Terms
      • Toilets
      • Towels
      • VideoObject
      • VirtualLocation
      • WebAPI
  • Specifications
    • Specifications Overview
  • Useful links
    • Data Visualiser
    • Data Validator
    • Dataset Dashboard
    • Non-technical Guidance
  • OpenActive on GitHub
    • Overview
    • Activity List
    • Community
    • Controlled Vocabularies
    • Dataset Publication
    • Documentation
    • Implementation Support
    • Programmes
    • RPDE
    • SKOS
    • Specifications
    • Validators
Powered by GitBook
On this page
  • Using geographic coordinates
  • Licensing and republishing
  • Rendering a geocoding user interface
  • Leaflet.js and OpenCage implementation example
  • Gladstone: Implementation example
Edit on GitHub
  1. Publishing Data

Including geo coordinates

Using geographic coordinates

In order to maximise the usefulness of your data, it is highly recommended that it includes GeoCoordinates. Many data users will not use your data unless it includes a latitude and longitude within the geo property of each Place.

"location": {
  "@type": "Place",
  "url": "https://www.everyoneactive.com/centres/Middlesbrough-Sports-Village",
  "name": "Middlesbrough Sports Village",
  "description": "You can enjoy a huge range of different sports and activities at Middlesbrough Sports Village. There’s a state-of-the-art gym, a full programme of group exercise classes, indoor badminton sessions and a soft play area for kids. Outside, the Village boasts a full range of athletics facilities, including an eight-lane 400m track, a 10-lane 100m track, as well as four long jump pits. There’s also high jump, hammer throwing, javelin and pole vaulting facilities. The latest addition to the facility is a £1.6m, 250m velodrome, alongside five all-weather outdoor pitches and a skate park for BMX bikes, scooters and inline skaters.",
  "telephone": "01642 728555",
  "address": {
    "@type": "PostalAddress",
    "streetAddress": "Alan Peacock Way",
    "addressLocality": "Village East",
    "addressRegion": "Middlesbrough",
    "postalCode": "TS4 3AE",
    "addressCountry": "GB"
  },
  "geo": {
    "@type": "GeoCoordinates",
    "latitude": 54.543964,
    "longitude": -1.20978500000001
  }
}

Licensing and republishing

In order to publish geographic coordinates in your open data feed, you must ensure that the source of these coordinates (usually your geocoder) permits you to republish this data under an open licence.

Rendering a geocoding user interface

Leaflet.js and OpenCage implementation example

Below is a copy-and-pastable example of a drag-and-drop map pin and geocoder, that can be used within your booking system to allow the user to enter reliable latitude and longitude data.‌

On load you may specify the map.centerMap(lat, lng) to set the initial position of the map.‌

On pressing the geocode button, the geocoder provides both latitude and longitude, which can then be stored in your database and later used within your open data feed(s).‌ The map pin can also be used to adjust these values.

See the "Result" tab below for a live demo.

Gladstone: Implementation example

An example of the map pin interface within the Gladstone leisure management system is shown below.

PreviousActivity list referencesNextSchedules

Last updated 1 year ago

The is an example of a geocoder that .

The basic licence does not permit open data republishing, and does not permit including the data in any externally facing API.

Given the inaccuracy of geocoding for sports venues, we recommend using (or a similar service) to implement a map to allow your users to move a pin to a specific location.

It is powered by , , and .

OpenCage Geocoder
permits such republishing
Google Geocoding API
leaflet.js
OpenStreetMap
open data compatible geocoding
open source libraries
Screenshot of the drag-and-drop map pin within the Gladstone system