Introduction
In this blog post, we’ll share our experience of working with the OS Maps API and integrating it into the Huntsman mobile application. We’ll provide an overview of the OS Maps library, discuss their API documentation, and share our experience of using their APIs on different platforms. We’ll also highlight the challenges we faced and how we overcame them.
Overview of OS Maps Library
Ordnance Survey offers a wide range of geographic data and services, allowing users to access, share, and visualize mapping data. Their OS Maps library provides a robust set of APIs for developers to integrate mapping functionality into their applications.
First Experience of Maps API
When we started exploring the OS Maps API, we were impressed by the range of map layers available, including road, outdoor, light, and leisure (premium) layers. These APIs are available in both WMTS standard and TMS, making it easy to integrate them into our mobile application. The documentation provided by OS Maps is decent, with clear information on error codes, authentication APIs, rate limiting, and more.
We found the code examples provided by OS Maps to be particularly helpful, especially for web integration. They offer examples using popular libraries like Leaflet, ArcGIS, and Open Layers, making it easy to get started. With a few minutes of review, we were able to set up a basic integration of the Map APIs on our local environment.
Problems We Faced
While integrating most of the layers was straightforward, we encountered issues with the Leisure layer, which is part of their premium APIs. Initially, we were using the react-native-maps library to render these layers. However, after some research, we discovered that the Leisure layer was only available in the EPSG:27700 coordinate system, whereas the other layers supported both EPSG:3857 and EPSG:27700.
For those unfamiliar, EPSG:3857 is a standard projected coordinate system used to render maps worldwide. Most map libraries, including react-native-maps, only support this projection. On the other hand, EPSG:27700 is a British National Grid system that only supports rendering of the United Kingdom.
This meant that we needed a library that supported the EPSG:27700 projection, which react-native-maps did not. Unfortunately, our research revealed that there were no other libraries for react-native that supported this projection.
Further Research and Findings
We decided to explore how OS Maps had implemented their APIs in their own applications. We found their GitHub repositories, which included Android and iOS SDKs for OS Maps. However, these repositories were archived, indicating that they were no longer maintained by the OS Maps team.
This lack of support for mobile platforms made it challenging for us to integrate the Leisure layer into our mobile application. We hope that OS Maps will provide more information and support for using their APIs on mobile platforms in the future.
Conclusion
In conclusion, our experience with the OS Maps API was mostly positive, with clear documentation and helpful code examples. However, we encountered significant challenges when trying to integrate the Leisure layer, which is only available in the EPSG:27700 coordinate system. We hope that OS Maps will provide more support for mobile platforms and consider maintaining their Android and iOS SDKs.
Looking for Expert Mobile Application Development Services?
If you’re looking for an expert mobile application development team in the UK, look no further! Our team has extensive experience in developing complex mobile applications, including those that integrate mapping APIs. Contact us today to discuss your project requirements and learn how we can help you bring your vision to life.