问题标签 [openstreetmap]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
349 浏览

postgis - osm2pgsql 对多面体的数据不正确

我尝试将欧洲 OSM 数据转换为我的 postgis 数据库,并观察到某些国家(如希腊或俄罗斯)导入不正确。

似乎它只占用了它们几何形状的一部分。例如,osm2pgsql 导入后,我的数据库中只有两个独立的希腊岛。

这很奇怪。我尝试使用不同的参数并得到相同的结果。我使用来自 SVN 0.69-23858 的最新版本 osm2pgsql 和来自Geofabrik的 osm 文件。

0 投票
3 回答
4019 浏览

google-maps - 如何将 .OSM 文件绘制到地图上?

我从开放的街道地图下载了一个 .osm 文件,我想将其绘制成地图。做这个的最好方式是什么?我不想使用谷歌地图。有没有其他可用的开源地图,我可以简单地使用他们的 API?

0 投票
3 回答
773 浏览

routing - Assessing OpenStreetMap for international routing

I have been using a commercial solution for route distances and travel times for North America and Western/Mid Europe. I am considering expanding the project to cover other countries - and perhaps the entire world. A very limited budget and patchy regional coverage from individual commercial providers, probably make locally-hosted OpenStreetMap the only viable option. Before someone suggests an online solution, my application requires a lot of intensive route calculation - something which would cost a lot or be very impolite (and probably banned) if performed using a web service. The results of the calculations are put back in the public domain, so rediting OpenStreetMaps is not a problem.

My problem is how do I assess the routing data coverage for individual countries in the OpenStreetMap database? Such an assessment could determine if the project is viable, and a suitable order for processing (ie. do the countries with the best coverage first).

High-end commercial data providers can typically supply statistical descriptions, as well as regional descriptions of surveyed coverage. OpenStreetMap is much more patchy - an area typically includes some roads, but not all roads. Individual location errors of a few metres of even 10-20m will not be a problem for my application (I'm looking at city-city distances), but route graph connectivity is. Ie. the road vectors must logically meet correctly at a junction.

Has anyone attempted to create statistics describing data coverage of the OpenStreetMap database?

If not, how would you go about it?

The best I can think of is to take a random sampling of places (eg. cities), and then attempt to calculate routes. There would have to be an assumption that the major roads will tend to be added before the minor roads. Therefore a route between two distant cities would use the logical major road, and not a minor road (which is typically longer/slower) because the major road is missing.

Another problem would be that it is physically not possible to drive between many towns. Often this is due to the presence of islands (where ferries could be used) but often there is no surface route (eg. settlements in Nunavut). So how would such statistics be used when comparing between (say) Tonga and Afghanistan. Afganistan probably has very low data coverage. Tonga is probably better but the settlements are spread out across an archipelago.

Some details about my application: All start and end points are towns and cities with locations taken from the Geonames database. Typically I am looking at the 1000 largest cities in a country that also have a population of at least 1000. Routes are currently calculated in duplicate as both fastest routes and shortest routes. Reasonable road speeds vary according to broad road categories. Estimated travel times are computed alongside road distances. These details are preferences for consistency- they are not set in stone.

0 投票
1 回答
166 浏览

mapping - 在免费数据集上映射信号强度

我正在寻找某种工具来生成地图(基于openstreemap),其中包含从扫描生成的(彩色)信号强度点(与wlan 无关,但与kismet 中的gpsmap 非常相似)。输入数据现在位于 .kml 文件中,但之前转换它不会有问题。有什么提示吗?

0 投票
2 回答
9445 浏览

asp.net - ASP.NET 中的 OpenStreetMap

我对在使用 ASP.NET 开发的 Web 应用程序中使用 OpenStreetMap 很感兴趣。任何人都知道是否有用于在 ASP.NET 中使用 OpenStreetMap 的控件、库或包装器?(C#,不使用 Javascript)。

提前致谢。

0 投票
9 回答
29134 浏览

javascript - OpenLayers 中的最小/最大缩放级别

我正在使用 OpenLayers 在网页中显示地图。我正在使用来自 CloudMade 的图块,但来自 OpenStreetMap 的 Mapnik 图块也会出现同样的问题。

我正在尝试限制地图,以便用户无法一直缩放到世界视图——我希望他们至少保持大致城市级别的缩放。

我试过使用minZoomLevel//属性maxZoomLevelnumZoomLevels只有maxZoomLevelandnumZoomLevels属性似乎有效,而minZoomLevel属性似乎完全被忽略了。

还有另一种方法可以做到这一点吗?

0 投票
2 回答
5973 浏览

iphone - 如何在 mkmapview 中打开 OpenStreetmap?-苹果手机

我已经阅读了某些相关的答案,但似乎没有得到正确的答案或我需要的答案。

当我们在 mkmap 视图中打开 googlemap 时,我想在 mkmapview 中打开 openstreet 地图。

如果有任何链接或示例代码显示它,请传递它。

提前致谢

0 投票
1 回答
2831 浏览

javascript - 在 Openlayers 中单击地图外部时如何激活功能 + 弹出窗口?

我正在重新解析已经加载到地图上的 KML,类似于此处的示例:http: //openlayers.org/dev/examples/sundials.html并将其转换为可点击的列表,该列表将使地图居中点单击,并显示它的弹出窗口。

这在谷歌地图中很容易做到,但我找不到任何类似的 Openlayers 示例。有没有更简单的方法来做到这一点?我缺少的内置东西?

HTML

JS:

然后对于 selectFeature 函数:

0 投票
2 回答
877 浏览

mapping - 使用 OpenHeatMap 和/或 OpenStreetMap 的自定义/简化地图

我正在使用OpenHeatMap开展一个项目,总体而言,这似乎是一个伟大的、简单的、执行良好的项目。它满足了我的所有需求,除了它依赖于 OpenStreetMap 进行映射,而且我找不到降低它呈现的细节级别的方法。理想情况下,我希望它简单地显示一个状态的非常高级的视图,并保持混乱,但我无法在 OpenStreetMap 或 OpenHeatMap 上找到任何方法来做到这一点。

有什么建议吗?OpenHeatMap 允许您设置地图图块来源,但除了 OSM 之外,我也找不到其他来源。

0 投票
2 回答
1594 浏览

iphone - 如何将我自己的地图制作成 iPhone 的 openstreetmap 瓷砖标准

我有自己的地图,现在如何将我的地图切割成openstreetmap standrad(他们的文件夹结构)?

这样我就可以将这些图块加载到服务器中并可以从那里访问???

请建议