1.0.41 • Published 7 years ago

jquery-gmaps v1.0.41

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

jQuery Google Maps

npm version

What is jquery gMaps?

jQuery gMaps is intended to reduce the time of frontend development. You can create maps customized with html attributes and some lines of javascript.

Installation

npm

npm install jquery-gmaps --save-dev

Webpack

require('jquery-gmaps');

jQuery

$(document).ready(function(){
  $('#map').gmaps();
});

HTML

    <div data-key="[YOUR API KEY]"
      data-zoom="4"
      role="map"
      class="gmaps">
        
        <div
          data-id="chile"
          data-lat="-35.675147"
          data-lng="-71.542969" 
          class="marker">
          <div class="marker-card">
            <h2>Chile</h2>
          </div>
        </div>

        <div
          data-id="argentina"
          data-lat="-38.416097"
          data-lng="-63.616672" 
          class="marker">
          <div class="marker-card">
            <h2>Argentina</h2>
          </div>
        </div>

        <div
          data-id="brasil"
          data-lat="-14.235004"
          data-lng="-51.92528" 
          class="marker">
          <div class="marker-card">
            <h2>Brasil</h2>
          </div>
        </div>

        <div
          data-id="peru"
          data-lat="-9.189967"
          data-lng="-75.015152" 
          class="marker">
          <div class="marker-card">
            <h2>Perú</h2>
          </div>
        </div>

    </div>

Map settings

AttributeTypeValuesDefaultExplanation
data-keyString----You can get your api key here.
data-zoomInteger--4Sets the initial map zoom
data-clusteringBooleantrue or falsefalseGroup the map markers

Map controls

AttributeTypeValuesDefaultExplanation
data-control-zoomBooleantrue or falsefalse--
data-control-typeBooleantrue or falsefalse--
data-control-scaleBooleantrue or falsefalse--
data-control-streetviewBooleantrue or falsefalse--
data-control-rotateBooleantrue or falsefalse--
data-control-fullscreenBooleantrue or falsefalse--

Map events

AttributeTypeValuesDefaultExplanation
data-event-draggableBooleantrue or falsetrue--
data-event-doubleclickBooleantrue or falsetrue--
data-event-mousewheelBooleantrue or falsefalse--

To be continued...

1.0.41

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago

1.0.1-b

7 years ago

1.0.0-b

7 years ago