Template:Map/Point

Transforms a user POI Map point based on current map settings defined by Map/Extents, to a linear normalized point useful in the browser DOM. This template is used by other Map templates and is not normally used directly, but it can be. See Template:/Extents and Template:.


 * Usage
 * 1 - x user map coordinate
 * 2 - y user map coordinate


 * Returns: nothing or empty


 * Sets variables: 'pointLeft' and 'pointTop' with scaled x and y useful for browser DOM. Assumes the extents variables from Map/Extents have already been set-up correctly. Are scaled from 0.0 to 100.0 and suitable for use with CSS 'left' and 'top' position attributes.

Get scaled point for map coordinate 23,45 for a map that's 200 x 200
 * Examples

Get scaled point for extents with a virtual center at 50,50

Get scaled point for extents with a virtual center at 50,50

This template can be edited to support any type of coordinate system or mapping system. This template effectively generates the initial POI static placement values for each POI for each map. The JS code has code that mirrors these transforms for it's uses, for both projection and un-projection. If this template is edited in away that actually changes the scale or actual numerical output for points, then the MediaWiki:Map/code.js will also need to be changed to mirror and make available the same transforms.
 * For Admins and Maintainers