【问题标题】:leaflet vector layers - popuptemplate传单矢量图层 - popuptemplate
【发布时间】:2012-09-18 21:24:50
【问题描述】:

我正在尝试将 Leaflet 与 Leaflet Vector Layers (http://geojason.info/leaflet-vector-layers/) 和 ArcGIS Server 一起使用。我已经设置了弹出模板,并且可以按预期查看功能。但是,当我单击某个功能以获取信息时,我收到一个错误:“无法读取未定义的属性 'y'。”任何建议将不胜感激。我用来创建相关图层的代码如下:

lyrHospitals = new lvector.AGS({
    url: oHospitals.url + '/' + oHospitals.layerIds,
    fields: '*',
    //uniqueField: "onemap_prod.SDEADMIN.hls.OBJECTID",
    popupTemplate: function (properties) {
        return '<p>hello there</p>';
    },
    scaleRange: [10, 20],
    symbology: {
        type: 'single',
        vectorOptions: {
            icon: baseballIcon
        }
    },
    singlePopup: true
});

【问题讨论】:

    标签: map vector gis leaflet


    【解决方案1】:

    我刚刚更新了 Leaflet Vector Layers 以使用 Leaflet v0.4.x。您可以尝试使用最新的Leaflet Vector Layers,如果您仍然遇到此问题,请告诉我?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多