2

Well I'm trying to show the following entity:

{
  "contextResponses" : [
    {
      "contextElement" : {
        "type" : "City",
        "isPattern" : "false",
        "id" : "Miraflores",
        "attributes" : [
          {
            "name" : "position",
            "type" : "coords",
            "value" : "-12.119816, -77.028916",
            "metadatas" : [
              {
                "name" : "location",
                "type" : "string",
                "value" : "WSG84"
              }
            ]
          }
        ]
      },
      "statusCode" : {
        "code" : "200",
        "reasonPhrase" : "OK"
      }
    }
  ]
}

Wiring NGSI Source and NGSI Entity to Poi operatiors with MapViewer widget (Insert/Update PoI), with the following settings:

NGSI Source

NGSI Entity to Poi

  • Coordinates attribute: position

But nothing shows up in the map! Can somebody help me figure out what the problem is?

Jean-Paul
  • 19,910
  • 9
  • 62
  • 88
jiyin
  • 85
  • 1
  • 7

2 Answers2

1

Seems your configuration is correct (I'm assuming mydirection:1026 is a full URL, i.e. includes the protocol), but probably your network is filtering port 3000. Try to use http://ngsiproxy.lab.fi-ware.org as NGSI proxy instead of http://mashup.lab.fi-ware.org:3000/.

Indeed, I recommend you to enable https notifications in your context broker instance and use https://ngsiproxy.lab.fi-ware.org instead, especially if you are creating your WireCloud dashboard in an https web page (e.g. https://mashup.lab.fi-ware.org) as using this NGSI proxy will solve some mixed content problems, see:

Update: FIWARE has move from fi-ware.org to fiware.org. The recommended NGSI proxy server is now ngsiproxy.lab.fiware.org (ngsiproxy.lab.fi-ware.org still works).

Community
  • 1
  • 1
Álvaro Arranz
  • 2,015
  • 1
  • 13
  • 22
  • I was checking all URLs to configure my NGSI proxy and in my system, any is working. What URL proxy is working now? – miguelbemartin Apr 07 '16 at 12:07
  • @miguelbemartin, the host name (DNS) of the FIWARE Lab's NGSI proxy is `ngsiproxy.lab.fiware.org`. If your context broker supports https notifications then use `https://ngsiproxy.lab.fiware.org`, else use `http://ngsiproxy.lab.fiware.org` but taking into account the mixed content problems that will arise. – Álvaro Arranz Apr 07 '16 at 22:12
  • I don't know what is my error. I safe the position like that: { "name" : "position", "type" : "coords", "value" : "40.4, -3.6833", "metadatas" : [ { "name" : "location", "type" : "string", "value" : "WGS84" } ] }, – miguelbemartin Apr 11 '16 at 07:12
1

Three simple steps to start MapViewer on Fiware:

  1. Update the Orion ContextBroker in your system

  2. You should check if the daemons rush and rdis are installed and running in your system

  3. You should create a correct boot sequence in the init.d: redis, rush and contextBroker

After these steps, you can build your viewing interface in Wirecloud using MapViewer, NGSI source and NGSI entity to POI.

You must use structured JSON messages correctly as in the following example:

{ "contextElements": 
 [
    {
        "type": "iotdevice","isPattern": "false","id": "edison1", "attributes": 
        [
            {
                "name": "temperature",
                "type": "string",
                "value": "10"
            },
            {
            "name" : "position",
            "type" : "coords",
            "value" : "-20, 35",
            "metadatas" : [
              {
                "name" : "location",
                "type" : "string",
                "value" : "WSG84"
              }
         ]
         }
]
}
],

   "updateAction": "APPEND"
}
José Castillo Lema
  • 315
  • 1
  • 2
  • 17