API Docs for:
Show:

VanCoverageDesigner Class

To show details of a van and design its coverage for all SLAs.

Constructor

VanCoverageDesigner

()

Methods

create_VAN_COVERAGE_JSON

(
  • slaId
  • slaTimeInMin
  • reachablePoints
)

To create Van Coverage JSON for a particular SLA and reachable Points.

Parameters:

  • slaId Int

    SLA ID

  • slaTimeInMin Int

    SLA Time (In minutes)

  • reachablePoints Array

    Array contains lat-long objects.

deleteAllPolygons

()

To delete all polygons from the map

deleteAllRoutes

()

To delete all routes from the map based on the id (Blind Spot)

deleteAllVanReachablePoint

()

To delete all van reachbale points from the map

deleteMarker

(
  • markerId
)

To delete marker from the map based on the id

Parameters:

  • markerId String

    id of marker

deletePolygon

(
  • polygonId
)

To delete polygon from the map based on the id

Parameters:

  • polygonId String

    id of polygon

deleteRoute

(
  • routeId
)

To delete a route based on the id (Blind Spot)

Parameters:

  • routeId String

    Id of route

deleteVanMarkers

()

To delete all the van markers from the map

drawPath

(
  • sourcePoint
  • destinationPoint
  • routeId
)

To draw path between two points and setting am routeId for the same. (Blind Spot)

Parameters:

  • sourcePoint Object

    source lat-long

  • destinationPoint Object

    destination lat-long

  • routeId Object

    route-id

drawPathManagerForMovedVan

()

To manage drawing paths on map at a time interval (Blind Spot)

drawPolygon

(
  • polyCoordinates
  • polygonTitle
)

To draw polygon on map with some lat-long

Parameters:

  • polyCoordinates Array

    array of lat-long objects

  • polygonTitle String

    polygon title

findReachablePointsForVan

(
  • sourcePosition
  • pointAngle
  • radius
)

To get a position at an angle and at a distance on google map.

Parameters:

  • sourcePosition Object

    position(lat-long object) of source

  • pointAngle Number

    angle in Degrees

  • radius Number

    distance in KMs

generateVanCoverage

(
  • marker
)

To generate van coverage for a marker

Parameters:

  • marker Object

    marker object

generateVanCoverage

(
  • marker
)

To generate van coverage for a marker

Parameters:

  • marker Object

    marker object

getCoverageForVan

(
  • newLatOfVan
  • newLongOfVan
  • slaTimeInMin
  • minRadius
)

To get circular points at a distance and at an angle.

Parameters:

  • newLatOfVan Double

    marker's new lattitude

  • newLongOfVan Double

    marker's new longitude

  • slaTimeInMin Int

    SLA time in minutes

  • minRadius Int

    minimum radius

getCoverageForVanStatic

(
  • newLatOfVan
  • newLongOfVan
  • slaTimeInMin
  • minRadius
)

To get circular points at a distance and at an angle.

Parameters:

  • newLatOfVan Double

    marker's new lattitude

  • newLongOfVan Double

    marker's new longitude

  • slaTimeInMin Int

    SLA time in minutes

  • minRadius Int

    minimum radius

getExitingVanCoverage

(
  • van_id
)

To get Van coverage, if exists.

Parameters:

  • van_id String

    Id of Van

google.maps.LatLng.prototype.destinationPoint

(
  • angle
  • dist
)

To get a position at an angle and at a distance on google map.

Parameters:

  • angle Number

    angle in Degrees

  • dist Number

    distance in KMs

initialize

()

To initialize the map and binding the event handlers

loadAllSla

()

To populate SLA combobox.

Number.prototype.toDeg

()

To convert a radians into degrees.

Number.prototype.toRad

()

To convert a degrees into radians.

prepare_GET_VAN_COVERAGE_JSON

(
  • slaId
  • slaTimeInMin
)

To create Van Coverage JSON for a particular SLA to store exiting Covearge.

Parameters:

  • slaId Int

    SLA ID

  • slaTimeInMin Int

    SLA Time (In minutes)

putMarkerOnMap

(
  • map
  • markerInfoWindowContent
  • markerLat
  • markerLong
  • markerTitle
  • markerId
  • markerImage
  • isDraggable
  • setMapCenter
  • openInfoWindow
)

To put a marker on map with supplied information. (Blind Spot)

Parameters:

  • map Object

    map object

  • markerInfoWindowContent String

    info-window html string

  • markerLat Object

    marker's lat

  • markerLong Object

    marker's long

  • markerTitle Object

    marker's title

  • markerId Object

    marker's id

  • markerImage Object

    marker's icon image

  • isDraggable Object

    true if marker is draggable

  • setMapCenter Object

    true if marker click will center the map

  • openInfoWindow Object

    true if info window should open

resetBlindSpotGenerator

()

To reset blind spots generator

saveVanCoverage

()

To save the generated Van Coverage

slaButtonClick

()

SLA button click handler If there is existing van coverage available then plot that on map, else allow designing van coverage on map click.