cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
359
Views
3
Helpful
4
Replies
Beginner

MapCoordinate question

here's my cmx version

{
   
"cmx_image_version": "CISCO_CMX-10.3.1-35.cmx",
   
"cmx_rpm_versions": [
       
"cisco_cmx_connect-10.3.1-15",
       
"cisco_cmx_wips-10.2.0-96",
       
"cisco_cmx-10.3.1-253"
   
]
}

I want to know user current location so  I use

xx.xx.xx.xx/api/location/v2/clients for returning active client detail which includes real-time current location



"mapCoordinate": {

            "x": 112.32619,

            "y": 182.92868,

            "z": 0,

            "unit": "FEET"

        },

my problem is when I get mapCoordinate in x y I don't know that what x y really mean (does it have any relation to my building picture from  xx.xx.xx.xx/api/config/v1/maps/imagesource/domain_0_1500368087062.jpg )



So,  I want to know how I really know that where the current location of user from the mapCoordinate

Everyone's tags (3)
4 REPLIES 4
Beginner

Re: MapCoordinate question

for example, if I want  red dot (user current location) in my IOS app 

I get this floor image by call this api

cmxlocationsandbox.cisco.com/api/config/v1/maps/imagesource/domain_1_1421088051901.png  (this will return floor image)


and I put this pic on my IOS app

and I get current user location by call this api cmxlocationsandbox.cisco.com/api/location/v2/clients

  1. {
    • "macAddress":"00:00:2a:01:00:48",
    • "mapInfo":{
      • "mapHierarchyString":"CiscoCampus>Building 9>IDEAS!>CakeBread",
      • "floorRefId":"723413320329068650",
      • "floorDimension":{
        • "length":74.1,
        • "width":39,
        • "height":15,
        • "offsetX":0,
        • "offsetY":0,
        • "unit":"FEET"
        },
      • "image":{
        • "imageName":"domain_0_1462212406005.PNG",
        • "zoomLevel":4,
        • "width":568,
        • "height":1080,
        • "size":1080,
        • "maxResolution":8,
        • "colorDepth":8
        },
      • "tagList":[
        1. "Restroom",
        2. "Travel",
        3. "Laydown 2",
        4. "Entrance",
        5. "Entry1",
        6. "Entry2",
        7. "charls"
        ]
      },
    • "mapCoordinate":{
      • "x":20.647577,
      • "y":22.15144,
      • "z":0,
      • "unit":"FEET"
      },
    • "currentlyTracked":true,
    • "confidenceFactor":72,
    • "statistics":{
      • "currentServerTime":"2017-09-20T12:43:08.930+0100",
      • "firstLocatedTime":"2017-09-13T14:12:05.785+0100",
      • "lastLocatedTime":"2017-09-20T12:43:07.392+0100",
      • "maxDetectedRssi":{
        • "apMacAddress":"00:2b:01:00:0a:00",
        • "band":"IEEE_802_11_B",
        • "slot":0,
        • "rssi":-56,
        • "antennaIndex":0,
        • "lastHeardInSeconds":3
        }
      },
    • "historyLogReason":null,
    • "geoCoordinate":{
      • "latitude":36.12570646772202,
      • "longitude":-97.06606741624633,
      • "unit":"DEGREES"
      },
    • "rawLocation":{
      • "rawX":-999,
      • "rawY":-999,
      • "unit":"FEET"
      },
    • "networkStatus":"ACTIVE",
    • "changedOn":1505907787392,
    • "ipAddress":[
      1. "10.10.20.231"
      ],
    • "userName":"",
    • "ssId":"test",
    • "sourceTimestamp":null,
    • "band":"IEEE_802_11_B",
    • "apMacAddress":"00:2b:01:00:0a:00",
    • "dot11Status":"ASSOCIATED",
    • "manufacturer":"Trw",
    • "areaGlobalIdList":[
      1. 43,
      2. 3,
      3. 2,
      4. 1,
      5. 44,
      6. 45,
      7. 59,
      8. 125,
      9. 128,
      10. 58,
      11. 142,
      12. 143,
      13. 144,
      14. 42,
      15. 111
      ],
    • "detectingControllers":"10.10.20.90",
    • "bytesSent":77,
    • "bytesReceived":70,
    • "guestUser":false
    },

how would I know that where I must place the red dot on?

Frequent Contributor

Re: MapCoordinate question

Hi,

The floor map is oriented from the upper left hand corner (0,0), with increasing x values to the right and increasing y values down.  When the floor map is created in Prime Infrastructure, the entire area of the map is included in the inclusion region, which may lay outside the building.

Inclusion and Exclusion Areas on a Floor

  • Inclusion and exclusion areas can be any polygon shape and must have at least three points. Points can sometime be located outside the building. If this is where the devices are, then a coverage area should be created. At other times, the points are actually inside and should be moved to the nearest inside location (the same applies for unlikely areas inside). Defining inclusion and exclusion areas does this and therefore the analytic results are more consistent.
  • You can only define one inclusion region on a floor. By default, an inclusion region is defined for each floor when it is added to Prime Infrastructure. The inclusion region is indicated by a solid aqua line and generally outlines the region.
  • You can define multiple exclusion regions on a floor.
  • Newly defined inclusion and exclusion regions appear on heatmaps only after the mobility services engine recalculates location.

The geoCoordinate locations are based on GPS markers placed on the floor map in Prime Infrastructure.

Matt

Highlighted
Beginner

Re: MapCoordinate question

Thanks for the answer Matt

but I just realize that my API  return geoCoordinate = null


Can I use mapCoordinate instead geoCoordinate for get user current location


but I don't know any relation about the map that store in PI and mapCoordinate (Ex.map scale)


Any solution ?


thanks





Frequent Contributor

Re: MapCoordinate question

Hi,

For geoCoordinates please see the discussion thread Re: Latitude and longitude coordinates in Location API

Yes, you can use either geoCoordinates or x,y values which are both configured in Prime Infrastructure when you create the map.  The geoCoordinates (with correct GPS markers) are optional when creating the map.  The map scale is set when the boundaries of the map are defined for x,y coordinates.

Thanks,

Matt

CreatePlease to create content
Content for Community-Ad
August's Community Spotlight Awards
This widget could not be displayed.