Namespace mxn.util
Defined in: mxn.js.
Constructor Attributes | Constructor Name and Description |
---|---|
Method Attributes | Method Name and Description |
---|---|
<static> |
mxn.util.$m()
$m, the dollar function, elegantising getElementById()
|
<static> |
mxn.util.convertLatLonXY_Yahoo(point, level)
|
<static> |
mxn.util.getAvailableProviders()
Returns array of loaded provider apis
|
<static> |
mxn.util.getDegreesFromGoogleZoomLevel(pixels, zoom)
|
<static> |
mxn.util.getGoogleZoomLevelFromDegrees(pixels, degrees)
|
<static> |
mxn.util.getStyle(el, prop)
getStyle provides cross-browser access to css
|
<static> |
mxn.util.KMToMiles(km)
Convert kilometres to miles
|
<static> |
mxn.util.loadScript(src, callback)
loadScript is a JSON data fetcher
|
<static> |
mxn.util.loadStyle(href)
Load a stylesheet from a remote file.
|
<static> |
mxn.util.logN(number, base)
|
<static> |
mxn.util.lonToMetres(lon, lat)
Convert longitude to metres
http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM
"A degree of longitude at the equator is 111.2km.
|
<static> |
mxn.util.merge(oRecv, oGive)
Merges properties of one object into another recursively.
|
<static> |
mxn.util.metresToLon(m, lat)
Convert metres to longitude
|
<static> |
mxn.util.milesToKM(miles)
Convert miles to kilometres
|
<static> |
mxn.util.stringFormat(strIn)
Formats a string, inserting values of subsequent parameters at specified
locations.
|
<static> |
mxn.util.traverse(start)
Traverses an object graph using a series of map functions provided as arguments
2 to n.
|
Method Detail
<static>
mxn.util.$m()
$m, the dollar function, elegantising getElementById()
- Returns:
- An HTML element or array of HTML elements
<static>
mxn.util.convertLatLonXY_Yahoo(point, level)
- Parameters:
- {Object} point
- {Object} level
<static>
{Array}
mxn.util.getAvailableProviders()
Returns array of loaded provider apis
- Returns:
- {Array} providers
<static>
mxn.util.getDegreesFromGoogleZoomLevel(pixels, zoom)
- Parameters:
- {Object} pixels
- {Object} zoom
<static>
mxn.util.getGoogleZoomLevelFromDegrees(pixels, degrees)
- Parameters:
- {Object} pixels
- {Object} degrees
<static>
mxn.util.getStyle(el, prop)
getStyle provides cross-browser access to css
- Parameters:
- {Object} el
- HTML Element
- {String} prop
- Style property name
<static>
{Float}
mxn.util.KMToMiles(km)
Convert kilometres to miles
- Parameters:
- {Float} km
- Returns:
- {Float} miles
<static>
mxn.util.loadScript(src, callback)
loadScript is a JSON data fetcher
- Parameters:
- {String} src
- URL to JSON file
- {Function} callback
- Callback function
<static>
mxn.util.loadStyle(href)
Load a stylesheet from a remote file.
- Parameters:
- {String} href
- URL to the CSS file
<static>
mxn.util.logN(number, base)
- Parameters:
- {Object} number
- {Object} base
<static>
mxn.util.lonToMetres(lon, lat)
Convert longitude to metres
http://www.uwgb.edu/dutchs/UsefulData/UTMFormulas.HTM
"A degree of longitude at the equator is 111.2km... For other latitudes,
multiply by cos(lat)"
assumes the earth is a sphere but good enough for our purposes
- Parameters:
- {Float} lon
- {Float} lat
<static>
mxn.util.merge(oRecv, oGive)
Merges properties of one object into another recursively.
- Parameters:
- {Object} oRecv
- The object receiveing properties
- {Object} oGive
- The object donating properties
<static>
mxn.util.metresToLon(m, lat)
Convert metres to longitude
- Parameters:
- {Object} m
- {Object} lat
<static>
{Float}
mxn.util.milesToKM(miles)
Convert miles to kilometres
- Parameters:
- {Float} miles
- Returns:
- {Float} km
<static>
mxn.util.stringFormat(strIn)
Formats a string, inserting values of subsequent parameters at specified
locations. e.g. stringFormat('{0} {1}', 'hello', 'world');
- Parameters:
- strIn
<static>
mxn.util.traverse(start)
Traverses an object graph using a series of map functions provided as arguments
2 to n. Map functions are only called if the working object is not undefined/null.
For usage see mxn.google.geocoder.js.
- Parameters:
- start