Table of Contents
1 Introduction
The development of web applications that manipulate geo-referenced information is increasingly supported by specialized Application Programming Interfaces (APIs) that enable rapid development cycles and high-quality applications. These APIs serve programmers with varying expertise levels, and selecting an appropriate API can significantly impact developer productivity and project success.
API usability is crucial for facilitating the effective use of available functionalities. This study compares three prominent maps APIs: Google Maps JavaScript API, ArcGIS API for JavaScript, and OpenLayers JavaScript Mapping Library, representing commercial, GIS professional, and academic perspectives respectively.
API Size Comparison
Google Maps: Significantly smaller API footprint
Evaluation Period
One year of version analysis
Prototype Functionality
8 core mapping features implemented
2 Comparison Setup
2.1 Selected APIs and Versions
The study analyzed multiple versions of each API over a one-year period:
- Google Maps: Versions 3.7 – 3.9
- ArcGIS: Versions 2.0 – 3.1
- OpenLayers: Versions 2.3 – 2.12
2.2 Prototypes for Comparison
Three JavaScript prototypes with identical functionality were developed using each API. The prototypes implemented eight core mapping functionalities identified through analysis of popular map applications and GIS course curricula:
- Zoom controls
- Full extent viewing
- Pan navigation
- Map controllers
- Overview map
- Geo-referenced entities
- Entity information association
- Location search
2.3 Metrics Identification
The Goal-Question-Metric (GQM) approach was employed to structure the quantitative comparison. Primary goals included assessing API usability impact on developer productivity and application complexity.
3 Software Metrics Framework
The study employed multiple software metrics to evaluate API complexity and usability:
Complexity Metrics: The cyclomatic complexity metric $M = E - N + 2P$ where E represents edges, N represents nodes, and P represents connected components, was adapted for API evaluation.
Size Metrics: API size was measured using:
- Number of classes and methods
- Lines of code required for equivalent functionality
- Documentation completeness scores
4 Results and Analysis
The comparative analysis revealed significant differences in API characteristics:
Key Insights
- Google Maps API demonstrated the smallest footprint and simplest learning curve
- ArcGIS API offered the most comprehensive GIS functionality but with higher complexity
- OpenLayers provided good balance between functionality and openness
- API size correlated strongly with implementation complexity
5 Related Work
Previous studies in API usability have focused on general programming interfaces, with limited attention to domain-specific APIs like mapping services. This study extends the work of Myers and Stylos (2012) on API usability and McCloskey's research on geospatial web services.
6 Conclusions and Future Work
The study concludes that API size significantly impacts usability, with smaller APIs like Google Maps enabling faster development cycles. Future work should explore longitudinal studies of API evolution and incorporate more diverse usability metrics.
7 Technical Analysis
This comparative study of mapping APIs represents a significant contribution to the understanding of domain-specific API usability. The research methodology, combining both specification analysis and practical implementation comparison, provides a robust framework for API evaluation that aligns with established software engineering principles.
The findings regarding API size and complexity resonate with Brooks' concept of "essential complexity" in software design. As noted in the seminal work "No Silver Bullet," inherent complexity cannot be eliminated, only managed. The Google Maps API's smaller size suggests better management of this essential complexity, making it more accessible to developers across skill levels.
The metric-based approach employed in this study builds upon established software measurement frameworks. The adaptation of cyclomatic complexity $C = E - N + 2P$ for API evaluation demonstrates innovative application of traditional software metrics to modern web development contexts. This approach could be extended to other domain-specific APIs following the methodology outlined in the IEEE Standard 1061 for Software Quality Metrics.
Comparative studies like this are crucial for evidence-based technology selection in software projects. As the geospatial web continues to evolve, with increasing importance in applications ranging from logistics to urban planning, understanding the trade-offs between different mapping APIs becomes increasingly valuable for both academic research and industrial practice.
8 Code Implementation
Basic Map Initialization Comparison:
// Google Maps API
function initGoogleMap() {
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 38.722, lng: -9.139},
zoom: 10
});
}
// OpenLayers API
function initOpenLayersMap() {
var map = new OpenLayers.Map('map');
var layer = new OpenLayers.Layer.OSM();
map.addLayer(layer);
map.setCenter(new OpenLayers.LonLat(-9.139, 38.722), 10);
}
// ArcGIS API
function initArcGISMap() {
require(['esri/map'], function(Map) {
var map = new Map('map', {
center: [-9.139, 38.722],
zoom: 10,
basemap: 'topo'
});
});
}
9 Future Applications
The evolution of mapping APIs continues with emerging trends:
- 3D and AR Integration: Enhanced visualization capabilities
- Real-time Data Processing: Streaming geospatial analytics
- Machine Learning Integration: Predictive mapping and pattern recognition
- Edge Computing: Offline mapping capabilities for mobile applications
- Standardization Efforts: OGC API - Features and other open standards
10 References
- Myers, B. A., & Stylos, J. (2012). API Usability: A Literature Review and Framework. IEEE Transactions on Software Engineering.
- McCloskey, B. (2011). Evaluating Geospatial Web Services. International Journal of Geographical Information Science.
- Brooks, F. P. (1987). No Silver Bullet: Essence and Accidents of Software Engineering. IEEE Computer.
- IEEE Standard 1061-1998: Standard for Software Quality Metrics Methodology.
- Open Geospatial Consortium (2020). OGC API - Features Standard.
- Google Maps JavaScript API Documentation (v3.9).
- ArcGIS API for JavaScript Documentation (v3.1).
- OpenLayers JavaScript Mapping Library Documentation (v2.12).