offline map for a web based (ASP.Net) application
I'm developing a web based application where I need to overlay some color layers over each country o开发者_StackOverflow社区r city . I know that I can use Google maps but the problem I have is that the server where we're deploying the app doesn't have access to the internet . so I need a map component like Google maps which I can use it offline , can any one suggest any component that I can use ?
You might check out openstreetmap. There you could download the planet.xml file for the whole world or specific files only for the regions you want to serve. Good material can be found also here: www.geofabrik.de
Then you will have to set up your own tileserver, which will crunch png-tiles for the xml-files provided and store all png-maps on your local harddrive.
The tileserver will probably have some web-api also. So your tileserver may run on localhost:8080 or another port, and your website runs maybe on apache on port 80. Then you would use some web-framework to access your own tileserver. This framework would be probably http://openlayers.org/ which can also draw shapes onto maps. As a tileserver-location, you would add the address to your local installed tileserver. Openlayers will then receive the crunched tiles and do some stuff with it.
So, you have to at least once get some information from the internet (planet.xml) and crunch your data. But be aware that this crunching might take a long time depending on how many countries you want to serve and also these png-files will take a lot of space.
Check out openstreetmap.org how to do all this, including some numbers.
Maybe it is even possible just to download the crunched tiles from openstreetmap and put them in a specific order and fire up a tileserver pointing to these tiles. This would probably much easier.
You cannot download the Google-Maps tiles and serve them in your own tile-server, since there is a license restriction on them.
Greetings,
Jan
You're going to find that difficult because the map data alone could take up several hundred megabytes of space to store. The OS provides offline mapping within the UK which they provide free but it is limited and you'll have to manually integrate it into your site.
Having a web-based application that can't access the internet seems a bit daft to me, surely there's a way around that?
精彩评论