{"id":20268061,"url":"https://github.com/rbrundritt/googlemapstoazuremapsshim","last_synced_at":"2026-05-18T04:03:53.054Z","repository":{"id":166508697,"uuid":"257712333","full_name":"rbrundritt/GoogleMapsToAzureMapsShim","owner":"rbrundritt","description":"A shim that quickly ports web apps that use Google Maps to Azure Maps.","archived":false,"fork":false,"pushed_at":"2021-04-22T21:37:56.000Z","size":1918,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-12T02:50:12.359Z","etag":null,"topics":["azure","azure-maps","gis","google-maps","google-maps-javascript","google-maps-javascript-api","maps"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rbrundritt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-21T20:48:35.000Z","updated_at":"2023-12-05T22:36:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"d396a2f3-b98f-4c87-84bd-2a4c6a09191a","html_url":"https://github.com/rbrundritt/GoogleMapsToAzureMapsShim","commit_stats":null,"previous_names":["rbrundritt/googlemapstoazuremapsshim"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rbrundritt/GoogleMapsToAzureMapsShim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrundritt%2FGoogleMapsToAzureMapsShim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrundritt%2FGoogleMapsToAzureMapsShim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrundritt%2FGoogleMapsToAzureMapsShim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrundritt%2FGoogleMapsToAzureMapsShim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rbrundritt","download_url":"https://codeload.github.com/rbrundritt/GoogleMapsToAzureMapsShim/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rbrundritt%2FGoogleMapsToAzureMapsShim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010148,"owners_count":26084692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure","azure-maps","gis","google-maps","google-maps-javascript","google-maps-javascript-api","maps"],"created_at":"2024-11-14T12:16:25.591Z","updated_at":"2025-10-12T03:32:11.862Z","avatar_url":"https://github.com/rbrundritt.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"﻿\n# Google Maps V3 To Azure Maps Web SDK Shim\n\nThis project makes it possible to migrate most apps using the Google Maps V3 JavaScript library to the Azure Maps Web SDK with a single line of code. This shim covers about 90% of the API interface of Google Maps and simply ignores things it doesn’t support in majority of cases. \n\nUsing this shim is not the same as fully migrating the Azure Maps Web SDK. This shim is designed to mimic the behaviour of the Google Maps V3 JavaScript API. \nAs such, some Azure Maps Web SDK features are disabled to ensure a consistant experience with the API interface of Google Maps. \nFor example, to ensure the OverlayView class works, rotating and pitching the map are disabled when this class is used. \nFully migrating to the Azure Maps Web SDK will provide a more performance, features and functionalities.\nSee the [Migrate from Google Maps guide](https://docs.microsoft.com/en-us/azure/azure-maps/migrate-from-google-maps) for details on how to fully migrate your app.\n\n[Try the demos](https://rbrundritt.azurewebsites.net/demos/GoogleMapsShim/samples/)\n\n## How to implement\n\nImplementing this solution requires the following steps to implement:\n\n1. Sign up for an Azure Maps account via the Azure portal as outline in this [quickstart guide](https://docs.microsoft.com/en-us/azure/azure-maps/quick-demo-map-app).\n2. Download the **GoogleMapsToAzureMapsShim.js** file from the **dist** folder of this project.\n3. Add this file to your application like you would any other JavaScript file. \n4. Locate the script tag in your application which loads the Google Maps V3 SDK. It will look something like one of the following, but may have additional query parameters in the URL.  \n\n```html\n\u003cscript async await src=\"https://maps.googleapis.com/maps/api/js?callback=initMap\u0026key={Your_Google_Maps_Key}\"\u003e\u003c/script\u003e\n```\n\nSynchornous loading:\n\n```html\n\u003cscript src=\"https://maps.googleapis.com/maps/api/js?key={Your_Google_Maps_Key}\"\u003e\u003c/script\u003e\n```\n\n5. Update the `{placeholders}` in the following URL then replace the map script tag for Google Maps with following script tag. \n\n```html\n\u003cscript async await src=\"{Path_to_shim_file}/GoogleMapsToAzureMapsShim.js?key={Your_Azure_Maps_Key}\"\u003e\u003c/script\u003e\n```\n\nSynchornous loading:\n\n```html\n\u003cscript src=\"{Path_to_shim_file}/GoogleMapsToAzureMapsShim.js?key={Your_Azure_Maps_Key}\"\u003e\u003c/script\u003e\n```\n\nThe following URL parameters are also supported:\n\n- language\n- region\n\n### Library support\n\nThis shim provides some support for the following libraries. There is no need to specify these when loading the shim as they are automatically loaded.\n\n- drawing\n- geometry\n- visualizations\n- places\n- MarkerClusterer: A version of the `MarkerClusterer` class is provided in this shim. As such you can remove any script tags that load the **MarkerClustererPlus** or **MarkerClusterer** library.\n\n### Example Implementation\n\n**Before - using Google Maps**\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003eSimple Map\u003c/title\u003e\n    \u003cmeta name=\"viewport\" content=\"initial-scale=1.0\"\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cstyle\u003e\n         #map {\n             height: 100%;\n         }\n         \n         html, body {\n             height: 100%;\n             margin: 0;\n             padding: 0;\n         }\n    \u003c/style\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cdiv id=\"map\"\u003e\u003c/div\u003e\n    \u003cscript\u003e\n        var map;\n        function initMap() {\n            map = new google.maps.Map(document.getElementById('map'), {\n                center: { lat: -34.397, lng: 150.644 },\n                zoom: 8\n            });\n        }\n    \u003c/script\u003e\n    \u003cscript async defer src=\"https://maps.googleapis.com/maps/api/js?callback=initMap\u0026key={Your_Google_Maps_Key}\"\u003e\u003c/script\u003e\n\u003c/body \u003e\n\u003c/html \u003e\n```\n\n**After - Using Azure Maps via shim**\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n    \u003ctitle\u003eSimple Map\u003c/title\u003e\n    \u003cmeta name=\"viewport\" content=\"initial-scale=1.0\"\u003e\n    \u003cmeta charset=\"utf-8\"\u003e\n    \u003cstyle\u003e\n         #map {\n             height: 100%;\n         }\n         \n         html, body {\n             height: 100%;\n             margin: 0;\n             padding: 0;\n         }\n    \u003c/style\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003cdiv id=\"map\"\u003e\u003c/div\u003e\n    \u003cscript\u003e\n        var map;\n        function initMap() {\n            map = new google.maps.Map(document.getElementById('map'), {\n                center: { lat: -34.397, lng: 150.644 },\n                zoom: 8\n            });\n        }\n    \u003c/script\u003e\n    \u003cscript async defer src=\"{Path_to_shim_file}/GoogleMapsToAzureMapsShim.js?key={Your_Azure_Maps_Key}\"\u003e\u003c/script\u003e\n\u003c/body \u003e\n\u003c/html \u003e\n```\n\n## How to run the samples locally\n\nTo run the side by side comparison samples, do the following.\n\n1. Open the `samples/index.html` file in a text editor (or Visual Studio). \n2. Add your Azure Maps and Google Maps keys into the placeholders:\n\n\t```javascript\n\tvar googleMapsKey = '\u003cYour Google Maps Key\u003e';\n    var azureMapsKey = '\u003cYour Azure Maps Key\u003e';\n\t```\n\n3. Open the solution in Visual Studio and run it.\n\n## Known limitations\n\nThe following is a list of features that this shim does not currently support:\n\n- Custom controls (partial support)\n- Map projection\n- Street view\n- Custom map styles\n- Clickable POIs\n- Limited support for google.maps.Data.GeometryCollection\n- Icon Sequence\n- MapTypeRegistry\n- Styled Map Type\n- Transit layer\n- Bicycle layer\n- Fusion Tables Layer\n- Save Widget\n- Maps Engine Layer\n- Transit directions\n- Draggable directions\n- ElevationService\n- MaxZoomService\n- Image Map Type features: getTile, releaseTile, radius, ownerDocument of getTile\n- Places service features: find by phone number, getDetails limited to retrieving cached place data.\n- Marker features: anchorPoint, icon (labelOrigin, origin), symbol (labelOrigin), MarkerShape\n- Polyline/Polygon/Rectangle/Circle features: zIndex, strokePosition, icons\n- Data class features: scaledSize, sprites, zIndex, drawing\n- Edittable only works if the shape was created using drawing manager.\n\n### Common issues: \n\n- All image resources loaded into the map (custom icon images, tile layers, ground overlays), must be hosted in the same domain, or on a CORs enabled endpoint.\n\n## Additional Resources\n\n* [Migrate from Google Maps guide](https://docs.microsoft.com/en-us/azure/azure-maps/migrate-from-google-maps)\n* [Azure Maps (main site)](https://azure.com/maps)\n* [Azure Maps Documentation](https://docs.microsoft.com/azure/azure-maps/index)\n* [Azure Maps Web SDK Samples](https://github.com/Azure-Samples/AzureMapsCodeSamples)\n* [Azure Maps Blog](https://azure.microsoft.com/blog/topics/azure-maps/)\n* [MSDN Forums](https://social.msdn.microsoft.com/Forums/en-US/home?forum=azurelbs)\n* [StackOverflow [azure-maps]](https://stackoverflow.com/questions/tagged/azure-maps)\n* [Azure Maps feedback](https://feedback.azure.com/forums/909172-azure-maps)\n\n## License\n\nMIT\n \nSee [License](LICENSE) for full license text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbrundritt%2Fgooglemapstoazuremapsshim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frbrundritt%2Fgooglemapstoazuremapsshim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frbrundritt%2Fgooglemapstoazuremapsshim/lists"}