Skip to content

Instantly share code, notes, and snippets.

@maplinkapi
Created August 14, 2013 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maplinkapi/6232754 to your computer and use it in GitHub Desktop.
Save maplinkapi/6232754 to your computer and use it in GitHub Desktop.
var divIdName = "divMap";
var map = new MMap2(divIdName);
var point = new MPoint(-46.6520066, -23.5650127);
var zoomLevel = 8;
map.setCenter(point, zoomLevel);
LBS.Event.addListener(map, "mouseup", function (e) {
if (LBS.Event.isRightClick(e)) {
console.log("right click here!");
var point = map.getLatLngFromPixel(e.xy);
console.log("latitude: " + point.y);
console.log("longitude: " + point.x);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment