简体   繁体   中英

Map viewer retrieve POI from context Broker Instance

I can not get any data from a context BrokerInstance to display it in a Map viewer mashup. The context Broker is deployed in Fi-Ware cloud and the mashups are installed in the mashups section as recommended.

Here my entity (with the related curl request than you can roll out to check it that it responses properly):

curl 130.206.85.114:1026/ngsi10/contextEntities/Madrid -X GET -s -S --header 'Content-Type: application/json' --header 'Accept: application/json' \
>       --header "X-Auth-Token: $AUTH_TOKEN" | python -mjson.tool 
{
    "contextElement": {
        "attributes": [
            {
                "metadatas": [
                    {
                        "name": "location",
                        "type": "string",
                        "value": "WGS84"
                    }
                ],
                "name": "position",
                "type": "coords",
                "value": "40.418889, -3.691944"
            }
        ],
        "id": "Madrid",
        "isPattern": "false",
        "type": "City"
    },
    "statusCode": {
        "code": "200",
        "reasonPhrase": "OK"
    }
}

Here my mashup configuration:

NGSI Source:

NGSI entity to POI

  • Coordinates attribute: position

Map viewer:

  • Initial Location: Madrid

This questions related How to show an entity from in the Wirecloud MapViewer widget did not help me as long I have not any HTTPS server and I am using the recommended proxy.

Finally, point out that I tried "changing Use the FIWARE credentials of the user" to "No" and changing the "NGSI proxy URL" to other recommended configurations like http://ngsiproxy.lab.fiware.org (no score) with the same (negative) result..

Thanks for your help

I've tried what you said and I've managed to view the POI of Madrid you mention. I guess you don't see it for the security constraints on modern browsers. Have you noticed the security issue regarding access to insecure websites from HTTPS-based ones? Firefox and Chrome show a "shield" icon on the address bar, and you must acknowledge unsecure content for it to work.

For the future, using an HTTPS version of the NGSI proxy is recommended, though it will imply deploying RUSH together with the Context Broker for enablin HTTPS on Orion, or waiting for an upcoming version with HTTPS embedded.

Best regards

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM