Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 传单未捕获类型错误:无法读取属性';地理研究&x27;未定义的_Php_Codeigniter_Leaflet - Fatal编程技术网

Php 传单未捕获类型错误:无法读取属性';地理研究&x27;未定义的

Php 传单未捕获类型错误:无法读取属性';地理研究&x27;未定义的,php,codeigniter,leaflet,Php,Codeigniter,Leaflet,我想创建搜索填充和搜索按钮,但在控制台传单未捕获类型错误:无法读取未定义的属性“geosearch”。我必须把它包括进去,但它不起作用 我必须包括 <link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2

我想创建搜索填充和搜索按钮,但在控制台传单
未捕获类型错误:无法读取未定义的属性“geosearch”
。我必须把它包括进去,但它不起作用

我必须包括

<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/>
<link rel="stylesheet" href="https://unpkg.com/esri-leaflet-geocoder@2.3.2/dist/esri-leaflet-geocoder.css" integrity="sha512-IM3Hs+feyi40yZhDH6kV8vQMg4Fh20s9OzInIIAc4nx7aMYMfo+IenRUekoYsHZqGkREUgx0VvlEsgm7nCDW9g==" crossorigin="">
<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
<script src="https://unpkg.com/esri-leaflet@2.3.2/dist/esri-leaflet.js" integrity="sha512-6LVib9wGnqVKIClCduEwsCub7iauLXpwrd5njR2J507m3A2a4HXJDLMiSZzjcksag3UluIfuW1KzuWVI5n/cuQ==" crossorigin=""></script>
<script src="https://unpkg.com/esri-leaflet-geocoder@2.3.2/dist/esri-leaflet-geocoder.js" integrity="sha512-8twnXcrOGP3WfMvjB0jS5pNigFuIWj4ALwWEgxhZ+mxvjF5/FBPVd5uAxqT8dd2kUmTVK9+yQJ4CmTmSg/sXAQ==" crossorigin=""></script>

在身体里我也放了容器

<div id="mapid"></div>

这是脚本代码

    var map = L.map('mapid').setView([5.5725508, 95.3447782], 16);
    L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
        attribution: 'Map data &copy; <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
        id: 'mapbox/streets-v11',
        maxZoom: 20,
        accessToken: 'faore342fdsf'
    }).addTo(map);

    L.control.scale().addTo(map);
    var searchControl = new L.esri.Controls.Geosearch().addTo(map);
var-map=L.map('mapid').setView([5.5725508,95.3447782],16);
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}'{
属性:“地图数据©;贡献者,图像©”,
id:“地图盒/街道-v11”,
maxZoom:20,
accessToken:'faore342fdsf'
}).addTo(地图);
L.control.scale().addTo(映射);
var searchControl=new L.esri.Controls.Geosearch().addTo(map);

使用
var searchControl=L.esri.Geocoding.geosearch().addTo(map)