Tuesday, 20 June 2017

On GIS Lounge

An article about WMS Map Viewer on GIS Lounge.


Tuesday, 18 April 2017

Indexing and publishing web maps

https://wmsviewer-rodis.rhcloud.com/Web maps provide a useful and interactive experience in map handling and this along with the rich available content they offer justifies their extensive spread on the internet. Despite this fact, the protocols that the operation of web maps is based on are not directly supported by internet browsers so additional software is usually required for accessing web maps.
The most popular open web map protocol is WMS and it is used in web sites along with libraries like OpenLayers or Leaflet to support its operation. In order to index web maps or perform general purpose mapping operations, users should either use GIS packages like QGIS or Global Mapper which are desktop applications with limited portability capabilities or turn to applications like ArcGIS Online with restricted usage and subscription based access.
WMS Map Viewer on line is an http/JavaScript general purpose application for accessing and indexing web maps. The application is provided as SaaS (Software as a service) so that the necessary software required for managing web maps is rapidly loaded while accessing the web site of the app. Then the users may open the maps of their choice by simply entering its URL and layer name or choose from a list of preconfigured connections to various map sources.
The application is freely accessible without needing to create an account or subscribe. Also, it is compatible with all modern versions of the WMS protocol providing easy access to any web map. There are also other interesting built-in features like the ability to overlay map layers over other open maps enabling the composition of multilayer maps; the ability to open and display .kml file; the function of drawing on the maps and outputting the drawings as point, line or polygon .kml files.
An important feature of the app that empowers portability is the ability to store all open map layers in a single file that users may share and view from anywhere. The save & share feature is accessible as an option from the Tools drop down menu or from the Layers button. Using this feature the map layers that the user has open are saved in an .html file which contains all the information to load them again on the same or any other device desktop or mobile.
So, the saved .html files may be posted, shared or published on line as part of a website. Accessing the files from any device will open WMS Map Viewer on line with all the layers loaded as they were saved. These features make this application ideal for indexing, sharing and publishing sets of web map layers as third-parties may access and display the map without installing extra software everything will be loaded after double clicking (or tapping) on the .html file.


Saturday, 10 December 2016

Create files with Javascript

In web apps (the new trend is to call them progressive apps) it is often useful to create files on the fly. On this I talk about creating files on the user’s computer by executing some piece of code on the user’s browser and then let the user view them and even store them locally. The other alternative is to create files on the cloud so that the user may then download them, but sometimes this is not necessary. So let’s see how this can happen by placing a few lines of Javascript code on the web app.
The following example regards creating text files from text that is inputted by the user. For this we need a web page with basic formation and a textarea with id=”input” where users may type whatever they wish. Then some function that creates a file from input. And finally a function that makes the file downloadable.
The makeTextFile function creates the file on text input. At first it creates a null variable named textFile which will become the text file. Then a Blob named “data”. A blob is an object of immutable data (text or binary) that may be used like a file and Javascript uses blobs in order to manipulate files; in some cases this technique is used in order to prevent direct access of a script to the file system. You may create blobs containing binary or text data but in this example we focus on text files so our blob is of type 'text/plain'. Next step is to create a URL pointing to the blob using function URL.createObjectURL.

var textFile = null;
function makeTextFile (text) {
    var data = new Blob([text], {type: 'text/plain'});
    textFile = URL.createObjectURL(data);
    return textFile;

Function txt() that follows stores user input in variable textbox which will then be the input of makeTextFile function. Then the link with id=”downloadlink” of the web page is declared to point to the output of makeTextFile function. So by clicking on the link, user input is downloaded as a text file.

function txt() {
    var textbox = document.getElementById('input');
    var link = document.getElementById('downloadlink');
    link.href = makeTextFile(textbox.value);

Find the full source code of the above example in this link. In order to make this example I used various sources and examples from the web so there is no ownership on it; in other words “use it as you wish”.

Saturday, 29 October 2016

Zombies and other freaks in GIS workplaces

In the past, in certain jobs and certain offices I had the sense that I was surrounded by zombies and freaks.
It seems I 'm not the only one to have had such experiences. Read this post by geobreadbox.com which I can't decide if it is funny or horrifying serious.


Wednesday, 24 August 2016

Maps are better displayed on big (TV) screens

TV sets these days have become more powerful than ever. They are equipped with powerful operating systems like Android and WebOS and their screens seem more magnificent than they could ever be. So why not to use them for map display?
Maps contain information related to spatial data and it is always better to view them with a big clear view of the spatial information they carry. For instance, sometimes it is not so informative to view a generalized weather map in the small screen of a smartphone; a big screen or printing the map in a big paper give you a clear insight of the situation it represents. Also a school could use a set of digital maps for educational purpose rather than using a few printed maps not viewable from distance.
Of course professionals know these things and the use big computer screens for drawing maps but most other people use small screens even at home. Personally, I always thought that TV screens could have much more potentials beyond their traditional use. On this spirit I have released two applications that link viewing my web mapping application WMS Map Viewer On Line to Android TV and Amazon TV. The result is really great try it.

Play Store link

Amazon Appstore link