Skip to content

feat(google-maps): declarative SFC API - #510

Merged
harlan-zw merged 25 commits into
mainfrom
feat/google-maps-sfcs
Sep 22, 2025
Merged

feat(google-maps): declarative SFC API#510
harlan-zw merged 25 commits into
mainfrom
feat/google-maps-sfcs

Conversation

@harlan-zw

@harlan-zwharlan-zw commented Sep 22, 2025

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Continuation of #306

❓ Type of change

  • 📖 Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

This PR introduces 10 new Vue SFC components for Google Maps, enabling declarative map composition using Vue's template syntax.

  • ScriptGoogleMapsMarker - Classic markers with icon support
  • ScriptGoogleMapsAdvancedMarkerElement - Modern advanced markers with HTML content
  • ScriptGoogleMapsPinElement - Customizable pin markers
  • ScriptGoogleMapsInfoWindow - Information windows
  • ScriptGoogleMapsMarkerClusterer - Marker clustering
  • ScriptGoogleMapsCircle/Polygon/Polyline/Rectangle - Shape overlays
  • ScriptGoogleMapsHeatmapLayer - Heatmap visualization
<template>
<ScriptGoogleMaps
:center="{ lat: -34.397, lng: 150.644 }"
:zoom="8"
api-key="your-api-key"
>
<!-- Add markers -->
<ScriptGoogleMapsMarker
:options="{ position: { lat: -34.397, lng: 150.644 } }"
>
<!-- Info window appears on marker click -->
<ScriptGoogleMapsInfoWindow>
<div>
<h3>Sydney, Australia</h3>
<p>A great city!</p>
</div>
</ScriptGoogleMapsInfoWindow>
</ScriptGoogleMapsMarker>
<!-- Advanced marker with custom pin -->
<ScriptGoogleMapsAdvancedMarkerElement
:options="{ position: { lat: -34.407, lng: 150.654 } }"
>
<ScriptGoogleMapsPinElement
:options="{ scale: 1.5, background: '#FF0000' }"
/>
</ScriptGoogleMapsAdvancedMarkerElement>
<!-- Circle overlay -->
<ScriptGoogleMapsCircle
:options="{ center: { lat: -34.397, lng: 150.644 }, radius: 1000, fillColor: '#FF0000', fillOpacity: 0.35 }"
/>
</ScriptGoogleMaps>
</template>

@vercel

vercelBot commented Sep 22, 2025

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentPreviewCommentsUpdated (UTC)
scripts-docsErrorErrorSep 22, 2025 9:23am
scripts-playgroundReadyReadyPreviewCommentSep 22, 2025 9:23am

@harlan-zwharlan-zw changed the title feat(google-maps): SFC APIfeat(google-maps): declarative SFC APISep 22, 2025
@pkg-pr-new

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/scripts/@nuxt/scripts@510

commit: 6d2b6cc

@harlan-zw
harlan-zw merged commit ca1ecdb into mainSep 22, 2025
7 of 9 checks passed
@harlan-zw
harlan-zw deleted the feat/google-maps-sfcs branch September 22, 2025 09:22
Sign up for freeto 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.

2 participants

@harlan-zw@DamianGlowala