Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ricardofiorani/admap
AD Map is a simple jQuery plugin to render a map from an Address.
https://github.com/ricardofiorani/admap
Last synced: about 9 hours ago
JSON representation
AD Map is a simple jQuery plugin to render a map from an Address.
- Host: GitHub
- URL: https://github.com/ricardofiorani/admap
- Owner: ricardofiorani
- Created: 2015-12-07T13:56:44.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-02-02T12:21:53.000Z (almost 9 years ago)
- Last Synced: 2024-05-02T01:33:39.448Z (7 months ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# admap
admap.js is a simple jQuery plugin used to render a Google Maps based on an Address in the simplest way possible.# How to use:
You must require Google Maps API js (like this "http://maps.googleapis.com/maps/api/js?key=your_key", and don't forget to replace your_key with your Google Maps API key)
and the admap.js script.## Simple usage (With Data Attribute) :
```html
```
```js
$(document).ready(function () {
$('#map').renderMapFromAddress();
}
```## You can set the Google Maps options (and the address) like this :
```html
```
```js
$(document).ready(function () {
var options = {
zoom: 15,
address: "1313 Disneyland Dr, Anaheim, CA 92802, United States",
scrollwheel: false,
disableDefaultUI: true,
mapTypeId: google.maps.MapTypeId.ROADMAP,
styles: [{
"featureType": "administrative.land_parcel",
"elementType": "all",
"stylers": [{"visibility": "off"}]
}, {
"featureType": "landscape.man_made",
"elementType": "all",
"stylers": [{"visibility": "off"}]
}, {
"featureType": "poi",
"elementType": "labels",
"stylers": [{"visibility": "off"}]
}, {
"featureType": "road",
"elementType": "labels",
"stylers": [{"visibility": "simplified"}, {"lightness": 20}]
}, {
"featureType": "road.highway",
"elementType": "geometry",
"stylers": [{"hue": "#f49935"}]
}, {
"featureType": "road.highway",
"elementType": "labels",
"stylers": [{"visibility": "simplified"}]
}, {
"featureType": "road.arterial",
"elementType": "geometry",
"stylers": [{"hue": "#fad959"}]
}, {
"featureType": "road.arterial",
"elementType": "labels",
"stylers": [{"visibility": "off"}]
}, {
"featureType": "road.local",
"elementType": "geometry",
"stylers": [{"visibility": "simplified"}]
}, {
"featureType": "road.local",
"elementType": "labels",
"stylers": [{"visibility": "simplified"}]
}, {
"featureType": "transit",
"elementType": "all",
"stylers": [{"visibility": "off"}]
}, {
"featureType": "water",
"elementType": "all",
"stylers": [{"hue": "#a1cdfc"}, {"saturation": 30}, {"lightness": 49}]
}]
};
$('#map').renderMapFromAddress(options);
```