
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
googlemaps-vue3
Advanced tools
import GoogleMap from 'googlemaps-vue3'
createApp(App)
.use(GoogleMap, { apiKey: 'YOUR API KEY' })
...
const initializeGoogleMap = {
streetViewControl: true,
scaleControl: true,
center: { lat: 34.04924594193164, lng: 34.04924594193164 },
zoom: 2,
};
<GoogleMap :init="initializeGoogleMap" />
Custom Icon
You can set custom icon or use default icon
Note: Default Icon From TurkHub
const markers = reactive([
{
lat: 48.8566,
lng: 2.3522,
content: { content: `Paris Capital of <b>France</b>` },
icon:
"https://developers.google.com/maps/documentation/javascript/examples/full/images/parking_lot_maps.png",
},
{
lat: 51.5074,
lng: 0.1278,
content: { content: `London Capital of <b>England</b>` },
icon:
"https://developers.google.com/maps/documentation/javascript/examples/full/images/info-i_maps.png",
},
{
lat: 41.9028,
lng: 12.4964,
content: { content: `Roma Capital of <b>Italy</b>` },
},
{
lat: 41.9028,
lng: 12.4964,
content: { content: `Roma Capital of <b>Italy</b>` },
},
{
lat: 40.4168,
lng: 3.7038,
content: { content: `Madrid Capital of <b>Spain</b>` },
},
{
lat: 39.9334,
lng: 32.8597,
content: { content: `Ankara Capital of <b>Turkey</b>` },
},
]);
<GoogleMap :init="initializeGoogleMap" :markers="markers" />
<GoogleMap :init="initializeGoogleMap" :addMarkerOnClick="true" :markers="markers" />
<GoogleMap :init="initializeGoogleMap" :markers="markers" @clicked="customCoordinates = $event" />
Custom OnClick Event
function customClick(){
console.log('custom click')
}
<GoogleMap
:init="initializeGoogleMap"
:markers="markers"
:customClickFunction="() => customClick()"
@clicked="customCoordinates = $event" />
Note: User Position Icon From Alfredo Hernandez
<GoogleMap :init="initializeGoogleMap" :markers="markers" :getUserLocation="true" />
const polyineData = {
path: [
{ lat: 37.772, lng: -122.214 },
{ lat: 21.291, lng: -157.821 },
{ lat: -18.142, lng: 178.431 },
{ lat: -27.467, lng: 153.027 },
],
geodesic: true,
strokeColor: "#FF0000",
strokeOpacity: 1.0,
strokeWeight: 2,
};
`<GoogleMap :init="initializeGoogleMap" :polylines="polyineData" />`
const polygonData = {
paths: [
{ lat: 25.774, lng: -80.19 },
{ lat: 18.466, lng: -66.118 },
{ lat: 32.321, lng: -64.757 },
{ lat: 25.774, lng: -80.19 },
],
strokeColor: "#FF0000",
strokeOpacity: 0.8,
strokeWeight: 2,
fillColor: "#FF0000",
fillOpacity: 0.35,
};
`<GoogleMap :init="initializeGoogleMap" :polygon="polygonData" />`
<GoogleMap :init="initializeGoogleMap" :markers="markers" :layers="['trafficLayer', 'bicycleLayer']" />
<GoogleMap :init="initializeGoogleMap" :tile="'http://mt1.google.com/vt/lyrs=y&x=1325&y=3143&z=13'" />
const heatMapDatas = reactive([
{
lat: 37.782551,
lng: -122.445368,
},
{
lat: 37.782745,
lng: -122.444586,
},
{
lat: 37.782842,
lng: 122.443688,
},
{
lat: 37.782919,
lng: -122.442815,
},
{
lat: 37.7831,
lng: 122.441461,
},
{
lat: 37.783206,
lng: -122.440829,
},
{
lat: 37.783273,
lng: -122.440324,
},
{
lat: 37.783316,
lng: -122.440023,
},
{
lat: 37.783357,
lng: -122.439794,
},
{
lat: 37.783371,
lng: -122.439687,
},
{
lat: 37.783368,
lng: -122.439666,
},
]);
<GoogleMap :init="initializeGoogleMap" :heatMap="heatMapDatas"
/>
:useReverseGeocode="true"
@geocoding="geo = \$event"
/>`
FAQs
Google Maps Javascript Library Api For Vue.js 3
We found that googlemaps-vue3 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.