PlaceMap

Simplicite.UI. PlaceMap

new PlaceMap(app, ui, options)

Description:
  • PlaceMap controller

Parameters:
Name Type Description
app Simplicite.Ajax

Ajax service

ui Simplicite.UI.Engine

Main UI contoller

options Object

Options { lat, lng, zoom, stroke, fill }

Methods

addCircle(params)

Description:
  • Add a circle on map

Parameters:
Name Type Description
params Object

Parameters { lat, lng, radius, color }

addMarker(params)

Description:
  • Add a marker on map

Parameters:
Name Type Description
params Object

Parameters { id, lat, lng, zoom, info, center }

addPolyline(params)

Description:
  • Add a polygon on map

Parameters:
Name Type Description
params Object

Parameters { list:[{ lat, lng }], color }

addRectangle(params)

Description:
  • Add a rectangle on map

Parameters:
Name Type Description
params Object

Parameters { lat1, lng1, lat2, lng2, color }

clearMap()

Description:
  • Clear all markers and shapes

display()

Description:
  • Display a map with a marker

dms(c)

Description:
  • Convert latitude;longitude coordinates to DMS coordinates string

Parameters:
Name Type Description
c

Latitude;longitude coordinates

Returns:

DMS coordinates string

dms2lat(s)

Description:
  • Get latitude from DMS coordinates

Parameters:
Name Type Description
s

DMS coordinates string

Returns:

Latitude

dms2lng(s)

Description:
  • Get longitude from DMS coordinates

Parameters:
Name Type Description
s

DMS coordinates string

Returns:

Longitude

initGeocoder()

Description:
  • Init the Geocoder

initMap(ctn)

Description:
  • Init a map in the container

Parameters:
Name Type Description
ctn jQuery | string

Container

load(cbk)

Description:
  • Load the Javascript API

Parameters:
Name Type Description
cbk function

Onload callback

localize(address, cbk, notify)

Description:
  • Localize an address

Parameters:
Name Type Description
address

Full textual address

cbk

Callback function(location, formattedAddress)

notify

Optional message handler

localizeAndDisplay(ctn, address, cbk, notify)

Description:
  • Localize an address and display the map on marker

Parameters:
Name Type Description
ctn

Container

address

Full textual address

cbk

Callback function(location, formattedAddress)

notify

Optional message handler

removeMarkers()

Description:
  • Remove all markers

removeShapes()

Description:
  • Remove all shapes

staticMap(p, cbk)

Description:
  • Return a static map as img

Parameters:
Name Type Description
p Object

Options { lat, lng, width, height, zoom, key }

cbk function

Optional onload callback