offline map for a web based (ASP.Net) application - asp.net

I'm developing a web based application where I need to overlay some color layers over each country or 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?

Related

Creating an image within an .net core api without a graphical interface

OK, I did my share of searching and I have a good memory of what things I would know to hunt down, but have come up empty handed. I have the following:
.net core API on a really nice reliable server
the server is my data source for Open Sim projects
Open Sim servers can take a URL of an image and drop it directly onto the face of a virtual object.
My goal is to use the above to collect information from within the OpenSim (already done) and generate an image (.png is the likely target) using the data. The API is pure REST, but with a command, I'm pretty sure I can write a file to space on the server. But here's where I get stuck:
I know how to create images on a Windows console application and have done so for decades. But I'm not sure how to create a pure memory -> file graphical creation. For that further matter, almost 100% of it will involve fonts. How the heck do you make a .net core Web API aware of fonts? I'm simply not sure where to start. I'll take any advice.

Sharing large files efficiently on web link

I would like to provide a link on my web site to download a large file. This should be done with scale in mind. What is best efficient way as of today?
Of course i can do a classic way:
<a href="//download.myserver.com/largefile.zip" title="Download via HTTP" >
The problem with this approach is: i dont want traffic to my server to explode with downloads. So I would rather redirect to external hosting for this large file. What is best way to host this file then?
If you want to avoid download traffic to your server, then I personally suggest using Azure Blob Storage. There is lots of documentation and client libraries for .Net. It removes download traffic from your site and the security concerns of hosting files and moves them to the Azure cloud which is very secure to say the least.
If you want the files to be publicly available to anyone, then make a public container, get the url of the file you want and place it in the anchor tag, otherwise you may need to familiarise yourself with the blob leasing (plenty of documentation too). Though like most things it is not free. The silver lining is you only pay for what you use.
You can get started here.
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-quickstart-blobs-dotnet
Disclaimer,
I do not work for Microsoft, nor I do not benefit form this. This is just a personal opinion based on previous experiences and projects.

react-native-maps support offline google maps

I am new to react-native, and I am going to develop an application by using third-party library called react-native-maps. Currently, everything just working find with online map as this third-party library is used google map. But my problem is went I move to offline mode it would be caused a problem for my application.
My question is there any possible way to make google maps downloaded/cached when the application is load with the specific bound area of a country?
Thank you in advance.
As far as I am aware there is not a way to use the react-native provided MapView to cache the map data. At this time the only offline react-native module that supports offline mapping is react-native-mapbox-gl. I have used it in one of my projects and it is fairly simple to get up and running. The biggest issue with this project is it is still very pre v1.0 in terms of bugs. For basic cases it gets the job done.
Another project I have found has a lot of great features and has a snapshot function that I think could be used to mimic an offline map. I have not tried this but I am evaluating it at this time. react-native-maps
It would function as such:
The app can set aside a cache of a maximum size.
As the app requests tiles, these are cached to local storage.
There is an interface on the map object that enables you to cache a particular tile in the map at a particular zoom level.
The app periodically scans the cache and deletes items in LRU order until it gets under the maximum cache size.
Let me know if the maintainers would accept a pull request like this and I can work on it.

Build an Offline website - Burn it on a CD

I need to build a website that can be downloaded to a CD.
I'd like to use some CMS (wordpress,Kentico, MojoPortal) to setup my site, and then download it to a cd.
There are many program that know how to download a website to a local drive, but how to make the search work is beyond my understanding.
Any idea???
The project is supposed to be an index of Local community services, for communities without proper internet connection.
If you need to make something that can be viewed from a CD, the best approach is to use only HTML.
WordPress, for example, needs Apache and MySQL to run. And although somebody can "install" the website on his own computer if you supply the content via a CD, most of your users will not be knowledgeable enough to do this task.
Assuming you are just after the content of the site .. in general you should be able to find a tool to "crawl" or mirror most sites and create an offline version that can be burned on a CD (for example, using wget).
This will not produce offline versions of application functionality like search or login, so you would need to design your site with those limitations in mind.
For example:
Make sure your site can be fully navigated without JavaScript (most "crawl" tools will discover pages by following links in the html and will have limited or no JavaScript support).
Include some pages which are directory listings of resources on the site (rather than relying on a search).
Possibly implement your search using a client-side technology like JavaScript that would work offline as well.
Use relative html links for images/javascript, and between pages. The tool you use to create the offline version of the site should ideally be able to rewrite/correct internal links for the site, but it would be best to minimise any need to do so.
Another approach you could consider is distributing using a clientside wiki format, such as TiddlyWiki.
Blurb from the TiddlyWiki site:
TiddlyWiki allows anyone to create personal SelfContained hypertext
documents that can be published to a WebServer, sent by email,
stored in a DropBox or kept on a USB thumb drive to make a WikiOnAStick.
I think you need to clarify what you would like be downloaded to the CD. As Stennie said, you could download the content and anything else you would need to create the site either with a "crawler" or TiddlyWiki, but otherwise I think what you're wanting to develop is actually an application, in which case you would need to do more development than what standard CMS packages would provide. I'm not happy to, but would suggest you look into something like the SalesForce platform. Its a cloud based platform that may facilitate what you're really working towards.
You could create the working CMS on a small web/db server image using VirtualBox and put the virtual disk in a downloadable place. The end user would need the VirtualBox client (free!) and the downloaded virtual disk, but you could configure it to run with minimal effort for the creation, deployment and running phases.

Flex writing to it’s own directory

I have a Flex application I’m writing (Learning exercise) that I’d like to run of a network drive for many users to access. I’d like users to be able to save high scores on the network.
Users have read write to the network location it's on.
I don’t want to change anything on the computers that might use it (IE install AIR) or IE/Firefox settings. They are just default.
I don’t want to run a server (IE PHP)
Is there anyway to do it?
Cheers
Nope, not without AIR. And even then with difficulty. Flex runs within the context of the browser, and only has available to it the resources available to the browser (for obvious security reasons.)
Flash enjoys a unique position of corporate trust for reliability and safety, and they do everything possible to protect that position. So you're sandboxed.
The best I can think of is put together something that serves a URL and a common or custom read-write protocol - probably not trivial.
You will have to use a backend to access any of those resources. Eg, if you're using BlazeDS then you can just use Java to write to the network. You will have a server anyways to host your application.
You really want to use a backend technology for this. If you're dead set against it, Flash Player 10 can write files to the local filesystem. You could probably trick it to use a network resource by referencing it as a mapped drive or maybe even a named host.
http://livedocs.adobe.com/flex/3/langref/flash/net/FileReference.html#save()
You can also use the "load()" method of FileReference to read a local file into your Flex application.
I really don't recommend you write in an application using this but it looks like it could be done. The caveat here is that these actions can happen only if the user specifically chooses a location for a file: they need to select the file you want to load or choose the location where a file is saved.

Resources