Coder Social home page Coder Social logo

jarretth / jquery-parking-map Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nagyist/jquery-parking-map

0.0 1.0 0.0 2.39 MB

A jQuery plugin that creates a ParkWhiz parking map widget.

Home Page: http://parkwhiz.github.io/jquery-parking-map

License: MIT License

JavaScript 59.56% CSS 40.44%

jquery-parking-map's Introduction

ParkWhiz

jQuery ParkWhiz Parking Map (2.0.0)

A jQuery plugin that creates a ParkWhiz parking map widget.

  • jquery.parkingmap.js : v2.0.0
  • Released under the MIT License.
  • Parkwhiz.com/developers
  • Copyright (c) 2014 ParkWhiz, Inc.

Demo & Wizard

Getting Started

First, include all the plugin js/css in the head of your page.

  <!-- jquery.parkingmap.css -->
  <link rel="stylesheet" type="text/css" href="../source/css/jquery.parkingmap.css">

  <!-- jQuery,Google Maps, & jquery.parkingmap.js  -->
  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
  <script src="http://maps.googleapis.com/maps/api/js?sensor=false" type="text/javascript"></script>
  <script type="text/javascript" src="../source/jquery.parkingmap.js"></script>

Then, init the plugin by calling it inside a jQuery ready function. Something like this:

  $(function() {
    $("#parkwhiz-widget-venue").parkingMap({
      parkwhizKey: '...',
      location: {
        venue: 'united-center-parking',
      },
      // etc...
    });
  });

Configuration Settings

Required Setting = *

Option Type Default Description
* parkwhizKey string Your ParkWhiz API key, available at Parkwhiz.com/developers.
* location Object See details below An object describing the search area for the widget.
showLocationMarker boolean true If true, show a marker to denote the location searched by the widget as specified in the Location object.
showPrice boolean true If true, show prices for each lot. If false, show a generic "P" icon.
monthly boolean false If true, only monthly listings. If false, show only transient listings.
width string 100% A css width value for the map module. We recommend you don't make the width smaller than 300px.
height string 400px A css height value for the map module.
modules string ['map', 'time_picker', 'parking_locations'] An array of module codes to dictate the module order on the screen, accepted values are map, parking_locations, event_list and time_picker
moduleMarkup Object An array of output markup for each module above in modules
defaultTime Object See details below An object containing default timestamps for the timepicker, if present.
mapOptions Object An object with any option you can pass through to Google Maps' MapOptions object.
overrideOptions Object An object with any option you can pass through to the gmap3 plugin, upon which this plugin is based.

defaultTime Object

Option Type Default Description
defaultTime Object An object containing default timestamps for the timepicker, if present.
defaultTime.start integer moment().unix() A unix timestring representing the default search start time in the timepicker, rounded to the nearest half hour.
defaultTime.end integer moment().add('h', 3).unix() A unix timestring representing the default search end time in the timepicker, rounded to the nearest half hour.

location Object

Option Type Default Description
location Object An object describing the search area for the widget.
location.event string/string[] [] An event slug (such as att-park-parking/nlcs-89152) that corresponds to a URL on parkwhiz.com. The slug should NOT contain a forward slash.
location.destination string/string[] [] A plaintext address, zip, lat/lng, or array of plaintext addresses around which to search parking.
location.venue string/string[] [] A venue slug, such as united-center-parking, or an array of venue slugs corresponding to a URL on parkwhiz.com.
location.defaultEvent string null An event ID number, found as an integer at the end of an event URL slug, to select by default when the event picker module is present. The default event must be apart of the venue you are searching.
location.center Object null An optional object for centering the map away from the search location.
location.center.destination string null A plaintext address to optionally manually center the map away from the search location.
location.center.lat string null A plaintext latitude to optionally manually center the map away from the search location. Requires longitude.
location.center.lng string null A plaintext longitude to optionally manually center the map away from the search location. Requires latitude.

Methods

Coming soon.

Changelog

Version 2.0.0 - October 8, 2014

  • Refactored
  • Updated markers
  • Many bug fixes
  • Major overhaul

Version 1.0.2 - September 2, 2014

  • Added moduleMarkup option for custom templates
  • Added minified version of plugin to repo (jquery.parkingmap.min.js)
  • Various bug fixes

Version 1.0.1 - August 7, 2014

  • Cleaned up how events work. Fixed CSS to be plugin specific.

Version 1.0.0 - March, 2014

  • First public release of jquery.parkingmap.js.

Road Map

Here are some of the features planned for the future:

  • Methods

Contact, FAQ, Etc.

  • I found a bug or have a feature request. Please submit any bugs you might find on the repo issues tab.

Feel free to contact us if you have any further questions about jquery.parkingmap.js.

Dependencies

License

The MIT License (MIT)

Copyright (C) ParkWhiz, Inc., http://parkwhiz.com/

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

jquery-parking-map's People

Watchers

 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.