trigger - option argument
by ryanttb
HTML
<script src="http://code.jquerygeo.com/jquery.geo-1.0.0-b1.5.min.js"></script>
<div id="map"></div>
<button type="button">zoom in</button>
CSS
#map {
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
button {
position: fixed;
left: 8px;
top: 8px;
}
JavaScript
function bboxChange(e, geo) {
console.log("bbox: " + geo.bbox);
}
// create a map
var map = $("#map").geomap({
center: [-71.0595678, 42.3604823],
zoom: 8,
bboxchange: bboxChange
});
$("button").click(function() {
map.geomap("zoom", +1);
bboxChange(null, { bbox: map.geomap("option", "bbox") } );
});