Dev: SM: FAQ

From AAT Wiki
Jump to: navigation, search


Browser Compatibility

StreetMaps will work in most Browsers. Here are the Browsers StreetMap will NOT Work in:

  • Internet Explorer 5.5 and below
  • Opera (works partially in 9 and above)

How Do I re-position the map

The JumpTo() function allows you to re-position the map to a location of your choice.


Three arguments are passed to this function

X (float) New geographic X coordinate
Y (float) New geographic Y coordinate
z (float) New Zoom Level; this has to be a valid zoom level, one of the following: 10.24, 5.12, 2.56, 1.28, 0.64, 0.32, 0.12, 0.05, 0.02, 0.01, 0.005, 0.0025, 0.00125, 0.000625 This represents the amount of map, in degrees, per 300x300 pixel tile, between the center an an edge.

Important to remember that the map will not be update until the Init() function is called. View an example.

How do I get geographical coordinates from the map

The ClickCallback function will be fired whenever a user clicks on the map and will return the geographical coordinates of the clicked location. As seen below the ClickCallback function must be placed in the initial map load function. (See map basics).

function displayMap()
  // create the map
   myMap = new CAatMap("map1");



If a user now clicks on the map, a "ClickCallback" Function will be trigered and will pass three arguments will be passed to that function.

function ClickCallback(mapobj ,x,y)
  alert("you clicked  x:" + x + " y:" + y)
X (float) The geographical X coordinate at which the user clicked the map
Y (float) The geographical Y coordinate at which the user clicked the map
mapobj (CAatMap) The map object which was clicked on.

Here is an example.