我正在尝试使用esri传单在共享点地图中添加搜索栏。
它在IE和google chrome中都很好用...
现在,如果我在sharepoint中使用相同的脚本,则出现此错误: “未捕获的TypeError:无法读取未定义的私有代码特有的'控件'”
def generate_something(data):
warnings = []
if data is None:
raise Exception("No data!")
if data.value_1 == 2:
warnings.append('Hmm, value_1 is 2')
if data.value_2 == 1:
warnings.append('Hmm, value_2 is 1')
return MyObject(data), warnings
//Bare de recherche
var results = new L.LayerGroup().addTo(oMap);
var searchControl = new L.esri.Controls.Geosearch().addTo(oMap);
//var searchControl = new L.esri.Geocoding.geosearch().addTo(oMap);
searchControl.on('results', function(data){
results.clearLayers();
for (var i = data.results.length - 1; i >= 0; i--) {
results.addLayer(L.marker(data.results[i].latlng));
}
});
setTimeout(function(){$('.pointer').fadeOut('slow');},3400);