mapbox-google-maps-migration
Audited by Runlayer on Feb 23, 2026
Malicious tool definition detected
## Core Philosophy Differences ### Google Maps: Imperative & Object-Oriented - Create objects (Marker, Polygon, etc.) - Add to map with `.setMap(map)` - Update properties with setters - Heavy reliance on object instances ### Mapbox GL JS: Declarative & Data-Driven - Add data sources - Define layers (visual representation) - Style with JSON - Update data, not object properties **Key Insight:** Mapbox treats everything as data + styling, not individual objects.
## Testing Strategy ### Unit Tests ```javascript // Mock mapboxgl jest.mock('mapbox-gl', () => ({ Map: jest.fn(() => ({ on: jest.fn(), addSource: jest.fn(), addLayer: jest.fn() })), Marker: jest.fn() })); ``` ### Integration Tests - Test map initialization - Test data loading and updates - Test user interactions (click, pan, zoom) - Test API integrations (geocoding, directions) ### Visual Regression Tests - Compare before/after screenshots - Ensure visual parity with Google Maps version ## Check
Tool passed security scan