New advertisers: 50% off your first month with code FIRSTMONTHSee slots
mapbox avatar

Mapbox Google Maps Migration

Migration guide mapping Google Maps Platform APIs and patterns onto Mapbox GL JS equivalents.

skills.sh installs
1.5K
GitHub stars
87
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers map initialization, API method and event equivalents, markers, popups, and a seven-step migration strategy
  • Includes side-by-side Google Maps and Mapbox GL JS code, plus reference tables for map methods and events
  • Flags gotchas such as reversed [lng, lat] coordinate order and Street View, which has no Mapbox equivalent
  • Designed for developers moving existing web mapping applications from Google Maps Platform to Mapbox

Install

$ npx -y skills add mapbox/mapbox-agent-skills --skill mapbox-google-maps-migration -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Mapbox Google Maps Migration Skill

Comprehensive guidance for migrating from Google Maps Platform to Mapbox GL JS. Provides API equivalents, pattern translations, and strategies for successful migration.

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.

Map Initialization

Google Maps

const map = new google.maps.Map(document.getElementById('map'), {
  center: { lat: 37.7749, lng: -122.4194 },
  zoom: 12,
  mapTypeId: 'roadmap' // or 'satellite', 'hybrid', 'terrain'
});

Mapbox GL JS

Details

Repository
github.com/mapbox/mapbox-agent-skills
Category
Frontend & UI Code
First seen
May 16, 2026

More from mapbox/mapbox-agent-skills

All 18

Similar to Mapbox Google Maps Migration

More Frontend & UI Code