jquery-findus
Create contact-maps easily.
This plugin lets you quickly build a customizable map without hassling with google maps api.
Usage
Include dependencies
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js"></script>
<script src="jquery.findus.min.js"></script>
Provide some content containing a geocodeable address:
Find us here
8411 Market StreetSan Francisco
CA 94103
<div class="findus">
<h5>Find us here</h5>
<address>
8411 Market Street<br/>
San Francisco<br/>
CA 94103<br/>
</address>
</div>
Initialize findus:
$('.findus').findus();
Options
Name | Description |
---|---|
address | A geocodeable address string |
autoShow | Specifies whether to show info-window on render. Defaults to true. |
bindResize | Specifies whether to bind window resize. Defaults to true. |
content | HTML content to be shown in info-window. A geocodeable string can be explicitly defined by containing it in an address-tag. |
latitude | Location coordinate latitude |
longitude | Location coordinate longitude |
info | Options passed to the info-window instance |
map | Options passed to the map instance. Defaults to { zoom: 15, mapTypeId: google.maps.MapTypeId.ROADMAP, disableDefaultUI: true, draggable: false, zoomControl: false, scrollwheel: false, disableDoubleClickZoom: true } |
marker | Options passed to the marker instance |
You can also use data-attributes to setup the component. Target options by using prefixes, such as 'marker-icon'.
Changelog
- v0.0.5 - Added fix for map-icons
- v0.0.4 - Map option 'draggable' defaults to false now
- v0.0.3 - Fixed too strict jquery dependency
- v0.0.2 - Added prefixed data-attributes. Changed zoom default to 14. Draggable map by default.
- v0.0.1 - Initial Release