Ticket #75 (closed task: done)

Opened 7 years ago

Last modified 7 years ago

Can we add CMS "layer" to Google Map?

Reported by: jdalbey Owned by: jtorres
Priority: Medium Milestone: May 2019 Training
Component: CPTMS Version:
Severity: Minor Keywords:
Cc:

Description

Be able to toggle on / off a "layer" in the Google Map that shows locations of Changeable Message signs.  Each CMS icon has a color for active or not.  Clicking on the icon allows the user to enter text for the message (a fixed format).  Once a message is provided the icon changes color. 

Similar to  http://quickmap.dot.ca.gov/, click "Options" then under "Facilities' check "Message Signs" then click on a sign icon. 

We need another layer for HAR that works the same way except allows free format text.

Attachments

cms_locations_statewide.kml Download (132.3 KB) - added by jdalbey 7 years ago.
KML file with locations of all CMS in state (deprecated)
cms_locations_D12.csv Download (3.2 KB) - added by jdalbey 7 years ago.
cms locations only District 12
dyer1.txt Download (571 bytes) - added by jdalbey 7 years ago.
sample kml file
quickmap_cms.png Download (18.0 KB) - added by jdalbey 7 years ago.
sample cms sign image from QuickMap?

Change History

comment:1 Changed 7 years ago by jdalbey

  • Owner changed from jdalbey to jtorres
  • Status changed from new to assigned

A less obvious but mandatory feature is that when a user changes the message displayed in a CMS, EVERYONE should see the same message on their display. Probably the easiest way to do this is have the message text saved in a shared file on the network.

comment:2 Changed 7 years ago by jdalbey

  • Component changed from none to STMS

Changed 7 years ago by jdalbey

KML file with locations of all CMS in state (deprecated)

comment:3 Changed 7 years ago by jdalbey

I attached a file containing KML for all CMS in the state. I found it here:  http://www.dot.ca.gov/cwwp2/documentation/qm/qm.htm and they said it's deprecated, but it's probably good enough for our purposes. I also made it available on the web at  https://raw.githubusercontent.com/jdalbey/map-spikes/master/cms_locations_statewide.kml
I copied the example file from  https://developers.google.com/maps/documentation/javascript/kml and substituted the above link and it worked.

Changed 7 years ago by jdalbey

cms locations only District 12

comment:4 Changed 7 years ago by jdalbey

I attached a csv file with only district 12 locations. So we need to either convert this to KML format, or prune the statewide list to contain only the district 12 items.

comment:5 Changed 7 years ago by jdalbey

Committed a very crude prototype, kmldemo1.html, in src/cptms folder.

comment:6 Changed 7 years ago by jdalbey

Here's my thought on how to save the user's input:

Initially load a static file with CMS locations and the icon.
This might be KML, but could be JSON, don't know which is best.

When user clicks on a marker, we need a way to get the identifier
for that CMS. Then load a dynamic JSON file
that contains the message for every CMS. Each needs
an identifier of some sort, either a numeric key or perhaps
the postmile. Look up the identifier for the marker the user
clicked in the current message list,
put the message text into the message display.

(If this is too slow, we could reload the current message
list automatically every five seconds).

If the user enters a new message, grab the text and
assign it to the identifier. Then write out the entire
JSON file for all CMS.

Changed 7 years ago by jdalbey

sample kml file

comment:7 Changed 7 years ago by jdalbey

Submitted a prototype called cms_demo.html in r284. Here's a list off the top of my head of what needs to be improved.

  • Merge with cptms_map.html
  • Find actual lat/long for all district 12 cms.
  • After user modifies a message, change the icon to blue.  This might not be possible with current design that uses KML, since KML is meant for static data.
  • Limit user input to 40 characters (verify this number) as the signs have a fixed size.
  • Consider: Add a Cancel button next to Submit. Add a Clear button to clear current message.  Get clear UI semantics.
  • Don't update message file if no modification was entered or if Cancel was clicked.
  • Keep an audit trail of all message updates made by students for instructor assessment. 
  • If there is currently no message for a sign show empty black box.
  • We could try InfoWindow, but Submit is tricky because you have to wait until the window is displayed before you can add the button onclick listener.

comment:8 Changed 7 years ago by jdalbey

Additional info:

  • Merge with cptms map is low priority, it might be better if cms map was a separate "app".
  • CMS sign on Quickmap has dimensions: 3 rows, 17cols. Do we want to provide just a single text area for the user to enter all three rows? Or provide 3 input lines? Do auto word wrapping in a 3 row text area? See attached image of cms sign.

Changed 7 years ago by jdalbey

sample cms sign image from QuickMap?

comment:9 Changed 7 years ago by jdalbey

 http://www.dot.ca.gov/trafficops/tm/docs/CMS_Guidelines.pdf pg 22 says there are 3 lines with 16 characters per line for a standard freeway CMS..

comment:10 Changed 7 years ago by jdalbey

Prototype done: cms_demo.html committed in r298. Has colored icons for active/inactive, allows entering 3 lines of message text which persists.

For future reference, here's one solution for adding a dropdown menu to the map (to choose which layer is visible).  https://stackoverflow.com/questions/6396627/add-custom-control-to-a-google-map-thats-a-dropdown

comment:11 Changed 7 years ago by jdalbey

Added show/hide toggle in r299.
Also noticed a defect - two signs both seem to be cmsID 0, and rollover shows same text for VISTA HERMOSA. There are two entries with that name in the json file, but one is N and the other S.

comment:12 Changed 7 years ago by jdalbey

  • Status changed from assigned to closed
  • Resolution set to done

Proof of concept prototype approved, so closing this ticket. Future work will be listed as separate tickets.

Note: See TracTickets for help on using tickets.