API Docs for:
Show:

PositioningTool Class

Module: Geo

To show position of vans, reposition them and generate BlindSpot on a path.

Constructor

PositioningTool

()

Methods

BlindSpotCalculator

(
  • BS_waypoints
  • BS_waypoints_reverse
  • slaTimeInMin
)

To Calculate the blind spots on a path strech

Parameters:

  • BS_waypoints Array

    Source to Destination waypoints

  • BS_waypoints_reverse Array

    Destination to Source waypoints

  • slaTimeInMin Int

    SLA Time in minutes

BlindSpotGenerator

()

To generate blind spots

bs_deleteAllPolygons

()

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

bs_deleteAllRoutes

()

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

bs_deleteAllVanReachablePoint

()

To delete all van reachbale points from the map

bs_deletePolygon

(
  • polygonId
)

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

Parameters:

  • polygonId String

    id of polygon

bs_deleteRoute

(
  • routeId
)

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

Parameters:

  • routeId String

    Id of route

bs_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

bs_drawPathManagerForMovedVan

()

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

bs_generateVanCoverage

(
  • marker
)

To generate van coverage for a marker

Parameters:

  • marker Object

    marker object

bs_generateVanCoverageStatic

(
  • marker
)

To plot van at new position and draw its coverage and paths when there is No response from Google.

Parameters:

  • marker Object

    van marker object on map

bs_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

bs_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

bs_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

createUpdatedPOSITIONING_JSON

(
  • van
)

To create unique Van-JSON to update on the server.

Parameters:

  • van Object

    van-object contains van and its reachable point details.

deleteAllCircles

()

To delete all the circles from the map

deleteAllPolygons

()

To delete all polygons from the map

deleteAllRoutes

()

To delete all routes from the map

deleteArrowMarkers

()

To delete all the arrow markers from the map

deleteMarker

(
  • markerId
)

To delete marker from the map based on the id

Parameters:

  • markerId String

    id of marker

deleteMarkers

()

To delete all markers from the map

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

Parameters:

  • routeId String

    Id of route

deleteVanMarkers

()

To delete all the van markers from the map

deleteWaypoints

()

To delete all the waypoints from the map

disable_bs_van_tool

()

To disble van tool in blind spot toolbox

disable_bs_waypoint_tool

()

To disble waypoint tool in blind spot toolbox

dragEndHandlerForVan

(
  • marker
)

To plot van at new position and draw its coverage and paths

Parameters:

  • marker Object

    van marker object on map

dragEndHandlerForVan

(
  • marker
)

To plot van at new position and draw its coverage and paths

Parameters:

  • marker Object

    van marker object on map

dragEndHandlerForVanReachablePoint

(
  • marker
)

To plot van reachable point at new position and draw its path with distance check from the van

Parameters:

  • marker Object

    reachbale point marker object on map

drawBlindSpotRegion

(
  • bs_starts
  • bs_ends
)

To draw blind spots and their region

Parameters:

  • bs_starts Array

    blind spot start points

  • bs_ends Array

    blind spot end points

drawCircle

(
  • center
  • radius
  • circleTitle
)

To draw the circle on the map.

Parameters:

  • center Object

    center of circle

  • radius Int

    radius of circle

  • circleTitle String

    title of circle

drawPath

(
  • sourcePoint
  • destinationPoint
  • routeId
)

To draw path between two points and setting am routeId for the same.

Parameters:

  • sourcePoint Object

    source lat-long

  • destinationPoint Object

    destination lat-long

  • routeId Object

    route-id

drawPathManager

()

To manage drawing paths on map at a time interval

drawPathManagerForMovedVan

()

To manage drawing paths on map at a time interval

drawPolygon

(
  • polyCoordinates
  • polygonTitle
)

To draw polygon on map with some lat-long

Parameters:

  • polyCoordinates Array

    array of lat-long objects

  • polygonTitle String

    polygon title

enable_bs_van_tool

()

To enable van tool in blind spot toolbox

enable_bs_waypoint_tool

()

To enable waypoint tool in blind spot toolbox

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

getAllVansOnGeoView

()

To get all the Vans, place them on map, draw polygons and draw paths.

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

getDistanceAndTime

(
  • sourceLat
  • sourceLong
  • destinationLat
  • destinationLong
)

To get distance and time to raech to a point on google map and store that in a global object.

Parameters:

  • sourceLat Double

    source lattitude

  • sourceLong Double

    source longitude

  • destinationLat Double

    destination lattitude

  • destinationLong Double

    destination longitude

getMidpoint

(
  • points
  • midpointDistance
)

To get the midpoint between two points at a distance.

Parameters:

  • points Array

    source and destionation points

  • midpointDistance Int

    midpoint distance from a point

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.

loadCityChoices

()

To populate city combobox.

loadCityChoices

()

To populate city combobox.

loadStateChoices

()

To populate state combobox.

Number.prototype.toDeg

()

To convert a radians into degrees.

Number.prototype.toRad

()

To convert a degrees into radians.

putMarkerOnMap

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

To put a marker on map with supplied information.

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

resetVanCoverage

()

To Reset the Van server to earliar state.

setMapCenterToAddress

(
  • address
)

To set the map center on the passed addess.

Parameters:

  • address String

    address for the map

StateValid

()

To check state is entered or not.

updateVanCoverage

()

To update the Van coverage onto the server.