B.4 Other Control Functions
MapViewer provides other useful functions for working with SVG maps. These functions include the following:
getUserCoordinate(x,y)
converts the screen coordinates into the original map data coordinates. This function returns the converted result in an array. The first element of the array is the converted X coordinate, and the second element of the array is the converted Y coordinate.getScreenCoordinate(x,y)
converts the original map data coordinates into the screen coordinates. This function returns the converted result in an array. The first element of the array is the converted X coordinate, and the second element of the array is the converted Y coordinate.
Parent topic: JavaScript Functions for SVG Maps