Maps
For maps we've used some components from a Vue library vue-google-maps which is a wrapper over the original google maps library. You can use it by simply importing the maps view in the page you want to render it:
import * as VueGoogleMaps from 'vue2-google-maps'
Vue.use(VueGoogleMaps, {
load: {
key: 'API_KEY_HERE'
}
})
For this component to work, you will need a google maps API key
Follow these steps to get an API key:
- Go to the Google API Console
- Create or select a project.
- Click Continue to enable the API and any related services.
- On the Credentials page, get an API key.
- Note: If you have an existing unrestricted API key, or a key with browser restrictions, you may use that key.
- From the dialog displaying the API key, select Restrict key to set a browser restriction on the API key.
- In the Key restriction section, select HTTP referrers (web sites), then follow the on-screen instructions to set referrers.
- (Optional) Enable billing. See Usage Limits for more information.
Sample maps
TIP
Fore detailed usage please refer to vue-google-maps and google-maps