Giter Club home page Giter Club logo

js-store-locator's Introduction

Please note: This repository is not currently maintained, and is kept for historical purpose only.

Store Locator Library for the Google Maps JavaScript API v3

This library enables developers to easily build store locator-type applications using the Google Maps JavaScript API v3. Analytics

The library provides the following features:

  • Pluggable data source – display stores from a data source of your choosing
  • HTML5 Geolocation – determines a good initial viewport for the user
  • Info window – shows details about a store
  • Street View
  • Extensible – customise your own markers, info windows, etc.
  • Fully-featured side panel, providing:
    • Feature filtering
    • Autocomplete search
    • List of nearby stores
    • Directions

Examples/Demos

The best way to become acquainted with the library is to see some of the examples:

  1. panel.html – A simple store locator, including panel. Data is fetched from a static CSV file.
  2. dynamic.html – Same as above, except stores are fetched dynamically from a JSONP web service.
  3. gme.html – Same as above, except stores are fetched dynamically from Google Maps Engine.
  4. custom.html – Various customisations to the default UI including custom markers and info window.
  5. places.html – Places are searched using the Google Places API, and displayed as a store locator.

Reference documentation

For detailed documentation on the library, including classes, events and sample usage, please see the reference documentation.

Quick Start

To get started, include the store-locator.min.js file on your HTML page. A set of CSS styles are also available, which provide styling for store details and side panel.

The library's functions are contained under the storeLocator namespace. The main class is called storeLocator.View. A View has two required parameters, a google.maps.Map, and a storeLocator.DataFeed.

A DataFeed is an object with the function getStores. This function is called each time the map needs an update. A simple example of a DataFeed can be found in the reference.

Contributing

Want to contribute? Check out the contributing guide!

Compiling the project

$ ./gradlew assemble

> gradlew.bat assemble

License

Copyright 2014 Google Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

js-store-locator's People

Contributors

brendankenny avatar broady avatar markmcd avatar stephenmcd avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.