Basic Map
Initially, map is loaded using standard map tiles.
You can add any layer or style to the map what Afrigis MapServer supports.
However, this API also supports other map types like imagery tiles.
You can set the map type using the option specified in AGMapOptions class.
Code Sample
var opts = new AGMapOptions();
opts.loadInitialMap = true;
var agmap = new AGMap(document.getElementById("map"),opts);
agmap.centreAndScale(new AGCoord(-25.7482681540537, 28.225935184269), 12);
Normal Operation
Now, an AGMap object that you have interacts with the Afrigis website currently and comes with a lot of built-in behavior.
You can make basic operations such as pan, zoom, zoom on double click, mouse scroll zoom, etc.
Even, you can zoom the map simply dragging any region of the map(disable by default).
The AGMap object also supports a number of extra features which helps you make other operations related to the map.
You can operate InfoDisplay,different types of map such as default map,imagery map,add different overlay or control instances.
More complex interactions are also accomplished through use of Maps API Events such as click,dragstart,dragend, etc.
Classes