Uploaded image for project: 'ONOS'
  1. ONOS
  2. ONOS-2109

Topology View -- (0,0) Coordinate Bug

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 1.2.0
    • Fix Version/s: 1.3.0
    • Component/s: None
    • Labels:
      None

      Description

      Probably related to ONOS-2398

      When you inject latitude/longitude coordinates to the Topology View, there is a timing issue where sometimes the calculated coordinates are (0,0) and all devices are displayed at (0,0) (top left corner) of the view. Screenshot shows that x,y and px,py are calculated as (0,0).

      I suspect the (0,0) comes from topoModel.js in the function coordFromLangLat due to its return statement assigning (0,0) if the projection of the coordinates is falsy. It is possible that the "projection" in the api isn't initialized at the time it is being called.

      Update:
      See code screenshot. p is undefined at the time the coordinates are being loaded – map data is loaded asyncronously so our projection is not defined at the time this code is being run. Some refactoring will have to be done. A cache might be implemented to save coordinates for later.

        Attachments

          Activity

            People

            Assignee:
            simon Simon Hunt (Inactive)
            Reporter:
            bri Bri Prebilic Cole
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: