LiteMaps is a jQuery plugin for use Google Maps in a quick and easy way.
In order to use LiteMaps you have to include the following libraries as JavaScript scripts:
Example:
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.litemaps.js"></script>
Example:
<script type="text/javascript">
$(document).ready(function(){
$('#map').litemaps({
width: '800px',
height: '600px',
markers:[
'Colon, Valencia, Spain',
{address: 'Avinguda Diagonal, Barcelona, Spain', content: 'This is the content of marker info window'},
{lat: 40.42052, lng: -3.70181, icon: 'http://chart.apis.google.com/chart?chst=d_map_pin_icon&chld=cafe'}
]
});
});
</script>
-
width
The width of map. Integer (will be interpreted as "px"), string with size in "px" or "%" are allowed.
Note: For static maps (see "staticmap" option below) only integer value is allowed.
Default: "800px"
-
height
The height of map. Integer (will be interpreted as "px"), string with size in "px" or "%" are allowed.
Note: For static maps (see "staticmap" option below) only integer value is allowed.
Default: "600px"
-
zoom
Level of zoom applied to map. Set "auto" value to set an automatic zoom in order to show all markers (combine with
center: "auto"
).Default: "auto"
-
center
Position to center the map. Address string, dict with structure
{lat: float, lng: float}
or "auto" (combine withzoom: "auto"
) values are allowed.Default: "auto"
-
type
Map type string. Available options are: roadmap, satellite, hybrid, terrain.
Default: "roadmap"
-
staticmap
Show a map image using Google Static Maps API. Boolean values (true or false) are allowed.
Default: false
-
markers
An array with the markers. Address string,
{address: string, content: string, icon: string}
or{lat: float, lng: float, content: string, icon: string}
are allowed.Default: Array()