Overview
One Map is the official national geospatial platform for Singapore, developed and maintained by the Government Technology Agency (GovTech). It provides a comprehensive set of APIs that enable developers to integrate Singapore-specific location data and mapping capabilities into their applications. The platform is designed to support a wide array of use cases, from public sector services to commercial mobile and web applications that require precise and up-to-date geographical information within Singapore.
The core offerings of One Map include APIs for fundamental geospatial operations such as geocoding, which converts addresses into geographical coordinates, and reverse geocoding, which does the opposite. Developers can also utilize the Routing API to calculate optimal paths and travel times between points, the Static Map API to generate non-interactive map images, and various thematic maps for visualizing specific datasets like planning zones or public transport routes. These capabilities make One Map a foundational tool for applications requiring location-based search, navigation, and data visualization within Singapore's urban landscape.
One Map is particularly well-suited for developers and organizations focusing on the Singapore market. Its data is curated by a governmental authority, ensuring a high degree of accuracy and relevance to local contexts. This makes it an essential resource for developing services that interact with Singapore's infrastructure, such as logistics, urban planning, real estate, and public information systems. The platform's commitment to providing free access, even for commercial use without registration for basic APIs, lowers the barrier to entry for many developers. For enhanced APIs and higher rate limits, a straightforward registration process provides an API key, as detailed in the One Map developer documentation.
The platform's developer portal offers clear documentation and practical examples, aiding in a smoother integration process. While One Map's primary strength lies in its specialized focus on Singapore, developers working on global applications might consider integrating it alongside broader mapping platforms. For instance, while One Map excels in Singapore-specific routing, a global routing solution might require combining it with services like Google Maps Platform's Routes API for international coverage. This specialized focus ensures that applications built with One Map benefit from precise, localized data accuracy, which is crucial for services operating within a compact and highly developed urban environment like Singapore.
Key features
- Search API: Allows users to search for addresses, points of interest, and other geographical entities within Singapore.
- Geocoding API: Converts Singaporean addresses (e.g., "1 Fusionopolis Way") into precise latitude and longitude coordinates.
- Reverse Geocoding API: Transforms geographical coordinates back into human-readable addresses or nearby points of interest in Singapore.
- Routing API: Calculates optimal routes between two or more points in Singapore, considering various modes of transport.
- Static Map API: Generates non-interactive, customizable map images for display in web or mobile applications.
- Thematic Maps: Provides access to specialized map layers that visualize specific datasets, such as land use, planning areas, or demographic information specific to Singapore.
- Location-Based Services: Supports the development of applications requiring real-time location tracking and proximity services within Singapore.
Pricing
One Map operates on a free-tier model, providing access to its APIs without direct monetary cost. The service distinguishes between basic and enhanced API usage, primarily through registration and the use of an API key.
| Feature | Unregistered Users (Basic APIs) | Registered Users (Enhanced APIs) |
|---|---|---|
| Cost | Free | Free |
| Registration Required | No | Yes (for API Key) |
| Rate Limits | Lower default limits | Higher limits with API key |
| Included APIs | Most core APIs | All core and enhanced APIs |
| Commercial Use | Permitted | Permitted |
| Support | Community/Limited | Enhanced support options |
For detailed information on current rate limits and specific API access tiers, developers should consult the official One Map developer guide.
Common integrations
- Web Mapping Libraries: Integrates with popular JavaScript mapping libraries like Leaflet or OpenLayers for interactive map displays.
- Mobile Application Frameworks: Can be used within iOS (Swift/Objective-C) and Android (Kotlin/Java) applications to provide location-aware features.
- Government Digital Services: Frequently used by Singapore government agencies to build public-facing services requiring location data, such as finding nearest facilities or planning routes.
- Logistics and Delivery Platforms: Utilized by businesses operating in Singapore for route optimization, delivery tracking, and address validation.
- Real Estate Portals: Helps in displaying property locations, nearby amenities, and calculating distances for real estate listings in Singapore.
Alternatives
- Google Maps Platform: Offers global mapping, geocoding, and routing services with extensive features, often used for broader geographical coverage.
- Mapbox: Provides customizable maps, location data, and developer tools, with a strong focus on design and flexibility for web and mobile applications.
- HERE Technologies: Delivers location intelligence, mapping, and platform services for various industries, including automotive and logistics, with a global reach.
Getting started
To begin using One Map's Search API with JavaScript, you can make a simple HTTP GET request. The following example demonstrates how to search for a specific address and log the results. For enhanced usage, register for an API key on the One Map developer portal to increase your rate limits.
async function searchOneMap(searchVal) {
const url = `https://www.onemap.gov.sg/api/common/v2.1/search?searchVal=${encodeURIComponent(searchVal)}&returnGeom=Y&getAddrInfo=Y`;
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
const data = await response.json();
console.log('Search Results:', data.results);
return data.results;
} catch (error) {
console.error('Error fetching One Map data:', error);
}
}
// Example usage: Search for a specific address in Singapore
searchOneMap('100 Victoria Street');
// Example usage: Search for a point of interest
searchOneMap('National Gallery Singapore');
This JavaScript code snippet illustrates how to construct a request to the One Map Search API, process the JSON response, and output the results to the console. The searchVal parameter is used to specify the query, and returnGeom=Y and getAddrInfo=Y parameters ensure that geometry and address information are included in the response. This foundational example can be expanded to integrate with interactive maps or other application features.