Skip to main content

Posts

Showing posts from February, 2011

ES6 101 - Map

ES6 101 - Map
ES6 Map is the topic of today’s post which also is the 11th in the ES6 101 Series. Map is going to be fairly easy, so before jumping into it, if you want to look at other features we have covered so far, here is a quick list for your reference.Fat Arrow FunctionsLexical Declarations - LetLexical Declarations - ConstSpread OPeratorTemplate LiteralRest OperatorDefault parametersDestructuringFor…ofSetNow let’s see what Map has to offer. As opposed to Set (which by the way, I highly recommend reading), Map saves values as key-value pair. Let’s see for ourselves how this works!Example of ES6 Mapvar dummyMap = newMap(); dummyMap.set("1"); // Method is set as against add in ES6 Setconsole.log(dummyMap); // [["1",null]] dummyMap.set("1", "one"); console.log(dummyMap); // [["1","one"]] dummyMap.set("2", "two").set("3","three"); console.log(dummyMap); // [["1","one&…

Delhi Metro's Airport Express Corridor mapped on GIS...

The Delhi Metro's showcase Airport Express Corridor, connecting the Indira Gandhi International Airport to the heart of the Delhi, was rolled out for the public on the 23rd of February, 2011.

         This is the first line in India to be mapped on GIS to enhance safety, maintenance and traffic regulation. Mapping the corridor on GIS will help in mobilising emergency services in case of a blast or fire on the train. Delhi Airport Metro Express Private Limited, the company operating the line, has mapped all the emergency services, including fire stations, police stations, hospitals, etc. along the alignment.

SSA to take up GIS mapping of schools

Sarva Shiksha Abhiyan (SSA), Karnataka, has embarked upon an ambitious project of mapping nearly 74,000 educational institutions, including junior colleges, in the State using the geographical information system (GIS) to bolster education by making best use of school infrastructure and to facilitate planning and development.


          Karnataka is the fourth State after Andhra Pradesh, Gujarat and Chhattisgarh to go for electronic mapping of schools, including aided and unaided schools. There are about 46,000 primary schools, 12,000 primary aided schools and 16,000 high schools and junior colleges in the State.

          The GIS mapping of schools in the State may be taken up on the model developed in Andhra Pradesh. The GIS software developed in Andhra Pradesh is being customised by the National Informatics Centre for storing, analysing and displaying geographical data of schools.

          The Union Ministry of Human Resource Development has given the green sig…

Map Your Valentine...

Google has now made it possible for you to remind that "Special someone" of that "Special moment" that you'll spent together at that "Special place"! With Google's new "Map Your Valentine", you can send a Valentine's eCard but with a twist - remembering a special place. It integrates with Google Maps and places the map inside a heart. So now you can send an eCard with your "Special" location and say "Remember the first gift I gave you?..." Or maybe something more romantic...

Fusion Table - Heat Map Layer

In continuation with the previous example on Fusion Table, we will have a look at another Fusion Table layer example. Today's point of discussion is heat map! What is a heat map? A heat map is geographical representation of data where the values taken by a variable in two-dimensional map are represented as colors. Higher the value of the variable, that place on the map would be represented with a deeper color.

    This example is very much similar to the previous one, just for one minor change! Let us have a look at the code.



    I have just used a readily available Google Fusion Table for this example. Any anomalies in the data is not my responsibility! Copy the above code in an html file and open it in your browser! You will see the fusion table heat map layer in action! The only change in this code from the previous one is that, the heatmap property of the fusion table layer is made true! The output of the above code looks as seen in the result section above!
    If you ha…

Fusion Table Layer...

Today we will have a look at the "Fusion Table" Layer example. But before we start with the actual code, we will have a look at what Fusion Table is. Google Fusion Table is a free service for sharing and visualizing data online. It allows you to share data, merge data from multiple tables into interesting derived tables, and see the most up-to-date data from all sources. There is a lot of documentation about Google Fusion Table available on the web. You can visit their home page or the Google Research Blog to gather more information about Fusion Tables.

    Let us have a look at the following code. The code is very short and simple to understand!


    The few things to look out for in the above code are:
The manner in which mapTypeId has been specified! In other Google Maps API v3 examples, we have seen that we specify mapTypeID as ROADMAP, SATELLITE, etc. i.e., all the letters are in uppercase and not in quotes! However, in this example we are required to specify mapType…

KML Layer Example

Until now, we have covered various examples involving markers, polylines, polygons, i.e. creating overlays. We have also seen other examples to remove overlays! We will now move on to some other concepts. Today we will have a look at what KML is and how to create a KML layer!

         Let us first understand what KML is and why is it necessary. KML stands for Keyhole Markup Language which is an XML schema for expressing geographic annotation and visualisation within 2D maps and 3D Earth browsers. The KML file specifies a set of features (place marks, images, polygons, 3D models, textual descriptions, etc.) for display in Google Earth, Maps and Mobile, or any other 3D Earth browser (geobrowser) implementing the KML encoding. Each place always has a latitude and a longitude. Other data can make the view more specific, such as tilt, heading, altitude, which together define a "camera view".

         So what we understand from this is that we can create geographic inf…