Class ahgeomap
Version
0.9.
<div id="divmap"></div> (...) <script> var oMap=new ahgeomap("divmap"); </script>
{undefined} addLineFromHomeToTarget(lat, lng)
draw a line from users position to target
{Boolean} addMapListener(name, sFunction)
add a listener to the map ... then you can react on changes like zoom, movement or events like mousemove, clicks etc.
{undefined} addMarker(title, lat, lng, sDescr)
set a marker icon
{undefined} addMarkerOnHome(title, sDescr)
set a marker icon on users position
{boolean} getCurrentPosition()
get current position and fill it into internal position vars; function returns return success of navigator.geolocation.getCurrentPosition
{object} getHomePosition()
get the position of the user (this returns the saved position of getCurrentPosition()
{position} getMapCenter()
get the position displayed at the center of the map. Note that this LatLng object is not wrapped.
{Integer} getMapZoom()
get zoom level of the visible map
{Boolean} setAsHomePos(position)
set home position; callback of navigator.geolocation.getCurrentPosition in this.getCurrentPosition
{Boolean} setHomePosition()
move map to users position
{Boolean} setOptions(aOptions)
set options and override defaults of see this._aMapOptions
{Boolean} setPos(position)
move map to a new position with a given position object
{Boolean} setPosition(fLat, fLong, iZoom)
move map to a new position by given coordinates
{Boolean} setZoom(iZoom, bUpdateMap)
set zoomlevel of a map
{undefined} showMap()
initialize and draw a map
{undefined} updateMap()
update existing, visible map: move to given poition; set zoom https://developers.google.com/maps/documentation/javascript/reference#Map