首页 > 解决方案 > 通过 GeoJSON 属性在 openstreetmap 上搜索

问题描述

我正在使用带有 openstreetmap 的传单根据我的 GeoJson 文件在地图上显示很多建筑物。

每个建筑物的属性中都有一个 building_num 和 street_num。

这是一栋建筑的样本

{"type":"FeatureCollection","features":[

{"type":"Feature","geometry":{ "type": "Polygon", "coordinates": [ [ [34.4764637423387, 31.5097381691672], [34.4763822185075, 31.5098307499284], [34.4762980308059, 31.5097739757906], [34.4763159180864, 31.5097564450505], [34.4762993367935, 31.5097456416474], [34.4763869581358, 31.5096476632677], [34.4764046321781, 31.5096623954047], [34.4764158129642, 31.5096803119759], [34.476409853397, 31.5096857882327] ] }
,"properties":{"building_num":"13","street_num":"1510","Name":"Name of the building"}}

]}

有什么方法可以使用其属性中的 building_num 和 street_num 搜索建筑物?

标签: javascriptleafletmapsopenstreetmapgeojson

解决方案


推荐阅读