PositioningTool Class
To show position of vans, reposition them and generate BlindSpot on a path.
Constructor
PositioningTool
()
Item Index
Methods
- BlindSpotCalculator
- BlindSpotGenerator
- bs_deleteAllPolygons
- bs_deleteAllRoutes
- bs_deleteAllVanReachablePoint
- bs_deletePolygon
- bs_deleteRoute
- bs_drawPath
- bs_drawPathManagerForMovedVan
- bs_generateVanCoverage
- bs_generateVanCoverageStatic
- bs_getCoverageForVan
- bs_getCoverageForVanStatic
- bs_putMarkerOnMap
- createUpdatedPOSITIONING_JSON
- deleteAllCircles
- deleteAllPolygons
- deleteAllRoutes
- deleteArrowMarkers
- deleteMarker
- deleteMarkers
- deletePolygon
- deleteRoute
- deleteVanMarkers
- deleteWaypoints
- disable_bs_van_tool
- disable_bs_waypoint_tool
- dragEndHandlerForVan
- dragEndHandlerForVan
- dragEndHandlerForVanReachablePoint
- drawBlindSpotRegion
- drawCircle
- drawPath
- drawPathManager
- drawPathManagerForMovedVan
- drawPolygon
- enable_bs_van_tool
- enable_bs_waypoint_tool
- findReachablePointsForVan
- getAllVansOnGeoView
- getCoverageForVan
- getCoverageForVanStatic
- getDistanceAndTime
- getMidpoint
- google.maps.LatLng.prototype.destinationPoint
- initialize
- loadAllSla
- loadCityChoices
- loadCityChoices
- loadStateChoices
- Number.prototype.toDeg
- Number.prototype.toRad
- putMarkerOnMap
- resetBlindSpotGenerator
- resetVanCoverage
- setMapCenterToAddress
- StateValid
- updateVanCoverage
Methods
BlindSpotCalculator
-
BS_waypoints -
BS_waypoints_reverse -
slaTimeInMin
To Calculate the blind spots on a path strech
Parameters:
-
BS_waypointsArraySource to Destination waypoints
-
BS_waypoints_reverseArrayDestination to Source waypoints
-
slaTimeInMinIntSLA 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:
-
polygonIdStringid of polygon
bs_deleteRoute
-
routeId
To delete a route based on the id (Blind Spot)
Parameters:
-
routeIdStringId of route
bs_drawPath
-
sourcePoint -
destinationPoint -
routeId
To draw path between two points and setting am routeId for the same. (Blind Spot)
Parameters:
-
sourcePointObjectsource lat-long
-
destinationPointObjectdestination lat-long
-
routeIdObjectroute-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:
-
markerObjectmarker object
bs_generateVanCoverageStatic
-
marker
To plot van at new position and draw its coverage and paths when there is No response from Google.
Parameters:
-
markerObjectvan marker object on map
bs_getCoverageForVan
-
newLatOfVan -
newLongOfVan -
slaTimeInMin -
minRadius
To get circular points at a distance and at an angle.
Parameters:
-
newLatOfVanDoublemarker's new lattitude
-
newLongOfVanDoublemarker's new longitude
-
slaTimeInMinIntSLA time in minutes
-
minRadiusIntminimum radius
bs_getCoverageForVanStatic
-
newLatOfVan -
newLongOfVan -
slaTimeInMin -
minRadius
To get circular points at a distance and at an angle.
Parameters:
-
newLatOfVanDoublemarker's new lattitude
-
newLongOfVanDoublemarker's new longitude
-
slaTimeInMinIntSLA time in minutes
-
minRadiusIntminimum 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:
-
mapObjectmap object
-
markerInfoWindowContentStringinfo-window html string
-
markerLatObjectmarker's lat
-
markerLongObjectmarker's long
-
markerTitleObjectmarker's title
-
markerIdObjectmarker's id
-
markerImageObjectmarker's icon image
-
isDraggableObjecttrue if marker is draggable
-
setMapCenterObjecttrue if marker click will center the map
-
openInfoWindowObjecttrue if info window should open
createUpdatedPOSITIONING_JSON
-
van
To create unique Van-JSON to update on the server.
Parameters:
-
vanObjectvan-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:
-
markerIdStringid of marker
deleteMarkers
()
To delete all markers from the map
deletePolygon
-
polygonId
To delete polygon from the map based on the id
Parameters:
-
polygonIdStringid of polygon
deleteRoute
-
routeId
To delete a route based on the id
Parameters:
-
routeIdStringId 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:
-
markerObjectvan marker object on map
dragEndHandlerForVan
-
marker
To plot van at new position and draw its coverage and paths
Parameters:
-
markerObjectvan 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:
-
markerObjectreachbale point marker object on map
drawBlindSpotRegion
-
bs_starts -
bs_ends
To draw blind spots and their region
Parameters:
-
bs_startsArrayblind spot start points
-
bs_endsArrayblind spot end points
drawCircle
-
center -
radius -
circleTitle
To draw the circle on the map.
Parameters:
-
centerObjectcenter of circle
-
radiusIntradius of circle
-
circleTitleStringtitle of circle
drawPath
-
sourcePoint -
destinationPoint -
routeId
To draw path between two points and setting am routeId for the same.
Parameters:
-
sourcePointObjectsource lat-long
-
destinationPointObjectdestination lat-long
-
routeIdObjectroute-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:
-
polyCoordinatesArrayarray of lat-long objects
-
polygonTitleStringpolygon 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:
-
sourcePositionObjectposition(lat-long object) of source
-
pointAngleNumberangle in Degrees
-
radiusNumberdistance 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:
-
newLatOfVanDoublemarker's new lattitude
-
newLongOfVanDoublemarker's new longitude
-
slaTimeInMinIntSLA time in minutes
-
minRadiusIntminimum radius
getCoverageForVanStatic
-
newLatOfVan -
newLongOfVan -
slaTimeInMin -
minRadius
To get circular points at a distance and at an angle.
Parameters:
-
newLatOfVanDoublemarker's new lattitude
-
newLongOfVanDoublemarker's new longitude
-
slaTimeInMinIntSLA time in minutes
-
minRadiusIntminimum 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:
-
sourceLatDoublesource lattitude
-
sourceLongDoublesource longitude
-
destinationLatDoubledestination lattitude
-
destinationLongDoubledestination longitude
getMidpoint
-
points -
midpointDistance
To get the midpoint between two points at a distance.
Parameters:
-
pointsArraysource and destionation points
-
midpointDistanceIntmidpoint 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:
-
angleNumberangle in Degrees
-
distNumberdistance 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:
-
mapObjectmap object
-
markerInfoWindowContentStringinfo-window html string
-
markerLatObjectmarker's lat
-
markerLongObjectmarker's long
-
markerTitleObjectmarker's title
-
markerIdObjectmarker's id
-
markerImageObjectmarker's icon image
-
isDraggableObjecttrue if marker is draggable
-
setMapCenterObjecttrue if marker click will center the map
-
openInfoWindowObjecttrue 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:
-
addressStringaddress for the map
StateValid
()
To check state is entered or not.
updateVanCoverage
()
To update the Van coverage onto the server.
