Skip to content

feat: Migrate and modernize React basic map with marker - #1603

Open
willum070 wants to merge 6 commits into
mainfrom
migrate-rgm-basic-map
Open

feat: Migrate and modernize React basic map with marker#1603
willum070 wants to merge 6 commits into
mainfrom
migrate-rgm-basic-map

Conversation

@willum070

@willum070 willum070 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR introduces the rgm-basic-map sample to the repository, migrating the foundational React map patterns and adding marker functionality for completeness. It serves as the baseline example for developers looking to integrate the Google Maps JavaScript API natively within a React application using the community-standard @vis.gl/react-google-maps library.

Key Changes

  • Sample Migration: Migrated rgm-basic-map from js-samples.
  • Configuration Updates: Updated package names, HTML meta titles, and region tags (maps_rgm_basic_map) to accurately reflect the new sample structure.
  • Code Cleanup: Formatted the codebase with Prettier and removed unused CSS (gmp-map), as the @vis.gl wrapper programmatically mounts a standard <div> that inherits from the root container.
  • Documentation Expansion: Authored a comprehensive README.md to establish best practices for React developers, explicitly covering:
    • Using <APIProvider> for optimal script loading and React Context management.
    • Demonstrating declarative, "uncontrolled" map state using <Map defaultCenter={...}>.
    • The requirement of passing a mapId to enable Cloud-based styling and Advanced Markers.
    • Rendering modern <AdvancedMarker> components instead of legacy google.maps.Marker classes.

Testing

  • Verified all TypeScript and ESLint checks pass (npm run build).
  • Verified the sample successfully runs locally (npm start) and correctly renders the map and Advanced Marker on the screen.

Change-Id: I912f02dbeb3c0b5af018ce934b5ca6423ac1fedc
Change-Id: Id920215ca434b63cb32e808b8bb234e9249e9dc4
Change-Id: I31ac0152d90798742182cf15f4e7fd610558f126
@snippet-bot

snippet-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Change-Id: Id78905993db1844a45e08c3061ae70a0ae992bd7
@willum070 willum070 changed the title feat: Migrate and modernize rgm-basic-map using @vis.gl/react-google-maps feat: Migrate and modernize React basic map with marker Aug 7, 2026
Change-Id: Ic4d6705f0b11ce28b60ee4cd589bd56a1da6e9c3
Change-Id: I7e792cd72d5029171072e855588e550f242a29b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant