How can I use OpenStreetMap in my Compact Framework App?

十年热恋 提交于 2020-01-01 05:30:11

问题


Does anyone know, how I can use OpenStreetMap inside my Compact Framework application? Is there a Framework or something like that? All I can find in their wiki is how to contribute to their project and to user their software to map data. But I want to use their maps to show the users location inside my own app. I could not find anything about using their web service or whatever I have to use to show their maps inside my application.


回答1:


There is a project on Google Code that wants to create a .NET library for the OpenStreetMap API. The website states that there currently is an alpha release, so it might be worth checking that out: code.google.com/p/openstreetmapnet

And there are two similar projects on CodePlex as well: osmscout.codeplex.com gmap4dotnet.codeplex.com

Maybe those can be used in the Compact Framework as well, or you could ask the project teams to add that feature (or get involved yourself, it is opensource after all).




回答2:


CloudMade provides APIs for embedding OpenStreetMap maps in many languages - but not .NET as of the time of writing. There are plain HTTP APIs for map tiles available that you could call from .NET programs, but this is of course fairly low-level.

The CloudMade APIs are designed for developers who want to embed OSM output in their projects, rather than the OSM API which is geared towards map creation, so I think you might be interested in the CloudMade stuff.

See http://developers.cloudmade.com/projects for more.




回答3:


They don't appear to have any CF libraries, but the API specification is well documented, so there's no reason you couldn't integrate with it.




回答4:


I've developed a CF component that can download OpenStreetMap tiles, and also plot points of interest and basic routes. Depending on your requirements, and any restrictions on licences that you're permitted to use, then it may be of use to you?




回答5:


Brutile looks quite promising. It is a library designed for C# to connect to OpenStreetMap sources. (Silverlight demo available Here.

The wiki also has a listing of all .NET related pages. Of the documented projects, OpenStreetMapViewer looks like it fits your needs the best. It's designed to display a portion of OpenStreetMap within a .NET app. I'm sure at least one of these will work for windows mobile.



来源:https://stackoverflow.com/questions/922333/how-can-i-use-openstreetmap-in-my-compact-framework-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!