L.Control.Search-如何按字母数字顺序对结果列表进行排序?

问题描述

我正在通过Leaflet创建一个Web遮阳板。我包括一个geojson图层,该图层由两个字段(“ id”和“ centro_mando”)组成。

我已经使用L.Control.Search在“ centro_mando”字段中搜索结果。它可以正常工作,但是该程序提供给用户的结果不是按字母顺序排列的。

我想按字母顺序获得这些结果。有什么办法可以实现?

enter image description here

这是我的代码

/* add options to control*/

var searchControl = new L.Control.Search({
      layer: cmJS,      propertyName: 'centro_man',autoType: false,textErr: 'Cm not found',zoom: 18,marker: false,circleLocation: false
  });

  /* add control to maP*/
 
 map.addControl(searchControl);

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)