How to show an object from a Wirecloud MapViewer widget

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" } } ] } 

Connecting an NGSI and NGSI Entity source to a Poi operator using the MapViewer widget (Insert / Update PoI) with the following settings:

NGSI Source

NGSI Object for Poi

  • Attribute Coordinates: Position

But nothing is displayed on the map! Can someone help me figure out what the problem is?

+2
source share
2 answers

It seems that your configuration is correct (I assume mydirection: 1026 is the full URL, that is, it includes the protocol), but your network is probably filtering port 3000. Try using http://ngsiproxy.lab.fi-ware.org as NGSI proxy server instead of http://mashup.lab.fi-ware.org:3000/ {000/.

In fact, I recommend that you enable https notifications in your instance of the context instance and use https ://ngsiproxy.lab.fi-ware.org , especially if you create your WireCloud toolbar on an https network (for example, https: //mashup.lab.fi-ware.org ), since using this NGS proxy server will solve some problems with mixed content:

Update : FIWARE will move from fiskware to fiware.org. The recommended NGSI proxy is now ngsiproxy.lab.fiware.org ( ngsiproxy.lab.fi-ware.org is still working).

+1
source

Three easy steps to run MapViewer on Fiware:

  • Update ConionBroker Orion on your system

  • You must verify that the daemon and rdis are installed and running on your system.

  • You must create the correct boot sequence in init.d: ​​redis, rush and contextBroker

After these steps, you can create your own view interface in Wirecloud using MapViewer, an NGSI source, and an NGSI object for POI.

You must correctly use structured JSON messages, 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" } 
+1
source

Source: https://habr.com/ru/post/1208185/


All Articles