如何在Wirecloud MapViewer小部件中显示实体 [英] How to show an entity from in the Wirecloud MapViewer widget

查看:103
本文介绍了如何在Wirecloud MapViewer小部件中显示实体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好吧,我试图显示以下实体:

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

使用具有以下设置的MapViewer小部件(插入/更新PoI)将NGSI源和NGSI实体布线到Poi运营商.

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

  • NGSI server URL: mydirection:1026
  • NGSI proxy URL: http://mashup.lab.fi-ware.org:3000/
  • NGSI entities: City
  • NGSI Attributes: position
  • 坐标属性:位置

但是地图上什么都没有显示!有人可以帮我弄清楚问题出在哪里吗?

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

推荐答案

似乎您的配置正确(我假设mydirection:1026是完整的URL,即包括协议),但是您的网络可能正在过滤端口3000.尝试将http://ngsiproxy.lab.fi-ware.org用作NGSI代理而不是http://mashup.lab.fi-ware.org:3000/.

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/.

实际上,我建议您在上下文代理中启用https通知实例并使用https://ngsiproxy.lab.fi-ware.org代替,特别是如果要在https网页中创建WireCloud仪表板(例如 https) ://mashup.lab.fi-ware.org ),因为使用此NGSI代理可以解决一些混合内容问题,请参见:

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:

  • Chrome: https://support.google.com/chrome/answer/1342714?hl=en
  • Firefox: https://blog.mozilla.org/tanvi/2013/04/10/mixed-content-blocking-enabled-in-firefox-23/

更新:FIWARE已从fi-ware.org移至fiware.org.推荐的NGSI代理服务器现在为ngsiproxy.lab.fiware.org(ngsiproxy.lab.fi-ware.org仍然有效).

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).

这篇关于如何在Wirecloud MapViewer小部件中显示实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆