@razaman2/vue-map
TypeScript icon, indicating that this package has built-in type declarations

1.0.10 • Public • Published

vue-map

Project setup

npm install --save @razaman2/google-map

Examples are provided for template and render functions.

Add map

h(GoogleMap, {
    apiKey: 'your google api key',
    options: {
        ...
    }
});
<GoogleMap api-key="your google api key" :options="{...}"/>

Add map with info window(s)

h(GoogleMap, {
    apiKey: 'your google api key',
    options: {
        ...
    }
}, () => [
    
    h(GoogleInfo, () => 'My info-window 1'),
    
    h(GoogleInfo, () => 'My info-window 2')

]);
<GoogleMap api-key="your google api key" :options="{...}">
    <GoogleInfo :options="{...}">My info-window 1</GoogleInfo>
    <GoogleInfo :options="{...}">My info-window 2</GoogleInfo>
</GoogleMap>

Add map with marker(s)

h(GoogleMap, {
    apiKey: 'your google api key',
    options: {
        ...
    }
}, () => [
    
    h(GoogleMarker, {
        options: {
            ...
        }
    }),
    
    h(GoogleMarker, {
        options: {
            ...
        }
    })

]);
<GoogleMap api-key="your google api key" :options="{...}">
    <GoogleMarker :options="{...}"/>
    <GoogleMarker :options="{...}"/>
</GoogleMap>

Add info window to marker

h(GoogleMarker, {
    options: {
        ...
    }
}, () => [
    h(GoogleInfo, {
        options: {
            ...
        }
    }, () => 'Info window on marker')
])
<GoogleMarker :options="{...}">
    <GoogleInfo :options="{...}">Info window on marker</GoogleInfo>
</GoogleMarker>

Documentation

See Google Maps JavaScript API Reference for assistance.

Readme

Keywords

none

Package Sidebar

Install

npm i @razaman2/vue-map

Weekly Downloads

1

Version

1.0.10

License

none

Unpacked Size

34.1 kB

Total Files

32

Last publish

Collaborators

  • razaman2