This is an example of a single layer dot map. Debug is turned on to show outputs and enable clicking on the layer dots. The ChainID column in the table is displayed onhover. layer.show() is called to show the layer on top of the map.
Note: ml.onload is used to ensure the MapLarge API is properly loaded in the DOM. Wrap the MapLarge API in ml.onload() to ensure availability of all functions and methods. If using jQuery this can be a replacement for document.ready
<html> <head> <script type="text/javascript" src="/JS"></script> <script type="text/javascript"> ml.onload(function() { //create a map zoomed in on Atlanta, GA (34,-84) //the second parameter is a Object literal var map = new ml.map('mapDiv', { lat: 34, lng: -84, z: 9 }); //add a layer with no style: default is "red dots" var layer = new ml.layer(map, { query: { table: 'hms/hotels', //table name = hotels select: 'geo.dot' //geography = dots }, onClick: 'debug', //show debug output when dots are clicked //this function runs when the mouse cursor moves over a layer object onHover: function (data, layer) { return data.data.ChainID; }, //NOTE--> for hover you must list the fields you want to use hoverFields: ['ChainID'] }); //show the layer layer.show(); }); </script> </head> <body> <div id='mapDiv'> </div> </body> </html>