Skip to content

Example for building a custom google map store locator with Vue

Notifications You must be signed in to change notification settings

pburdette/vue-store-locator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

02cafe3 · Jul 5, 2018

History

6 Commits
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018
Jul 5, 2018

Repository files navigation

vue-store-locator

store-locator-demo

Description

This repo is an example of how to build a store locator in Vue. It utilizes vue-google-maps and the Google Maps API. Before building this I searched for a good example and was unsuccessful in finding one. So I decided to build one and share the code for others in the same situation as I was. All code is written on the client-side, so no need for a backend to process radius etc. I've brought in static data for the sake of this repo, but in production you most likely will be making an API call to a endpoint.

Features

  • Display locations on a map
  • Display store information in sidebar
  • Search for locations inside a user supplied radius
    • Store list and map share same data, so the store list will update when the markers on the map update
  • Get directions from current location
  • Display distance from location in miles and sort

Running

The API key is hidden for obvious reasons. You will need to create config/dev.env.js and put your own API key in.

'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')

module.exports = merge(prodEnv, {
  NODE_ENV: '"development"',
  API_KEY: ''
})

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

About

Example for building a custom google map store locator with Vue

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published