Skip to main content

Posts

Showing posts from March, 2011

Geocoding

Geocoding is the process of converting addresses (like "Pune") into geographic coordinates (like latitude - 18.5193 and longitude - 73.8579), which you can use to place markers or position the map. The Google Maps API provides a geocoder class for geocoding addresses dynamically from user input. Accessing the Geocoding service is asynchronous, since the Google Maps API needs to make a call to an external server. For that reason, you need to pass a callback method to execute upon completion of the request. This callback method processes the result(s). To know more details about the geocoding requests, responses and results visit this link.

    Understanding the geocoding requests, responses and results is very important for proper understanding and execution of any geocoding functionality in Google Maps API v3. Let us have a look at the following example...



    The output of the above code will appear as seen in the results section above. The map is initially centered at…

Panoramia - Tag based search

If you don't already know what Panoramia is, you can have a look at this link, to know more about Panoramia and a basic example. Today we will have a look at a more sophisticated example for Panoramia Layer in Google Maps API v3. In today's example we will search and display only those images on the map that have the tag that is being searched for.

    The example is very simple and all you need to do is copy the following code in an html and open it in your browser. Search for whatever you want to and if there are images that have the same tag, then those images will appear on the map.




    The output of the above code looks as it is seen in the result section above. Now you can enter your search parameter in the search box. I had entered "Fruits" and the output was as seen in the image below.


    You can have your own search parameter. Enjoy the Panoramia ride!

Panoramio Layer...

Let's start with the obvious question first...What is Panoramio? Panoramio is a geolocation-oriented photo sharing website. Panoramio website was officially launched on October 3, 2005 by Joaquín Cuenca Abela and Eduardo Manchón Aguilar, two Spanish entrepreneurs and was acquired by Google in July 2007.

    Accepted photos uploaded to the site can be accessed as a layer in Google Maps, with new photos being added at the end of every month. The site's goal is to allow Google Maps and Google Earth users to learn more about a given area by viewing the photos that other users have taken at that place. The website is available in several languages and can be viewed here.

    You may add photos from Panoramio as a layer to your maps using the PanoramioLayer object. The PanoramioLayer renders a layer of geotagged photo icons from Panoramio on the map as a series of large and small photo icons. Let us now have a look at the following code to understand the concept in more detail.



The Bicycling Layer...

Recreational cyclists and bike commuters alike can plot cycle-friendly routes, find trails, and avoid snarling traffic with Google Map's Bicycle layer. Map's bike-friendly, green-toned map layer is very eye-pleasing. The Google Maps API allows you to add bicycle information to your maps using the BicyclingLayer object.

    The BicyclingLayer renders a layer of bike paths, suggested bike routes and other overlays specific to bicycling usage on top of the given map. Additionally, the layer alters the style of the base map itself to emphasize streets supporting bicycle routes and de-emphasize streets inappropriate for bicycles.

    Let us have a look at the following example. The code has a map which is centered at Pune, India. There are very few cycle tracks in Pune and so you will see just a few dark green lines on the map. But if you would change the latitude-longitude values in the code and center the map at USA, then you will see a full-blown bicycling layer.



    The ou…

Google Map's Real-Time Traffic Layer...

You can now check the traffic condition on the road before you leave for work, or a party or to your friend's place. Google's Traffic layer shows the traffic conditions in your area - LIVE!!! Live traffic data is available in major cities in the United States, France, Britain, Canada and Australia, with new cities and countries frequently added. The Google Maps API allows you to add real-time traffic information (where supported) to your maps using the TrafficLayer object. Traffic information is provided for the time at which the request is made. Consult this spreadsheet to determine traffic coverage support.

    Let us now have a look at the Google Maps API - Trafiic Layer example. Copy the following code in a simple text file and save it as html. Click on this html file and it will open in your default browser. You will then see the traffic conditions in your area - LIVE...



    The output of the above code looks as seen in the result section above. The map in this examp…

Now mosquitoes will be mapped...

The Indian Council of Medical Research (ICMR) will undertake a mapping of mosquitoes in Orissa, India using a Geographic Information System (GIS). The proposed GIS mapping of vectors is aimed at evolving a common strategy to fight all vector-borne diseases at one go. ICMR aims to complete the exercise before monsoon when mosquito breeding goes up. Once done for Orissa, similar exercises will be undertaken in other states as well. Besides RMRC, Vector Control Research Centre, Puducherry, and National Malaria Research Institute, Delhi, in collaboration with the Orissa state government will be a part of this exercise.

         While different vectors cause dengue, malaria, filaria and chikungunya, separate programmes are undertaken to control these diseases, resulting in duplication of efforts and resources. However, if all vectors of a particular location are known, one common programme can be designed for that area to kill all vectors. The mapping will help gradually shift fro…

Web based GIS for polling booths in West Bengal...

The election commission of India will install web-based GIS in West Bengal's polling booths to help the State Chief Electoral Officer track them on their web site. The system will provide a map showing the exact spatial location of all 51919 polling booths and nearby landmarks, with their latitudinal and longitudinal coordinates. Boundaries of the parliamentary and assembly constituencies of the booths, along with all the administrative boundaries will also be provided in the GIS-based map.

         The software will give a 360-degree view of the entire area falling within the 200-meter radius of each polling booth, including approach roads and nearby installations. It will show every detail of the polling station, such as the number of voters, number of polling and security personnel deployed, details about the current law and order situation and reports of past violence or disturbance in the area. While the maps will be accessible to all, classified information will be …

GeoRSS Layer...

It's been long since I last posted an example here...But I am finally posting one again and it is about creating a GeoRSS layer on the google base map, using the Google Maps API.

    The first question will be, "What is GeoRSS?" GeoRSS is nothing but geographically tagged or geographically referenced RSS feeds. RSS feeds having latitude- longitude information of the place of feed. Whether it's pictures from your vacation, favorite places on the globe, or the hiking trails you like to visit, all you have to do is geo-tag them and then load it up. This idea that you can view data from external sources inside Google Maps is really exciting.

    Moving on to the example...There's no great deal about it. Copy and paste the following code in a html file and open it in your default browser. Here follows the code...


    The output of the above code looks as seen in th result section above. The best thing about the GeoRSS layer is that, you will not see the same out…

Blue census, Water census...

The Uttar Pradesh State Water and Sanitation Mission (SWSM) will soon be documenting the drinking water resources across six zones of the state. These zones are Allahabad, Ghaziabad, Gorakhpur, Lucknow, Varanasi and Moradabad. The documentation - to be done through Geographical Information System (GIS) and Global Positioning System (GPS) mapping - will take note of ponds (manmade and natural), wells and handpumps. This exercise which is a part of the National Rural Drinking Water Programme (NRDWP) will help the officials to create a proper database of these resources, which will be used for their management.

         Through the mapping, all the details of all the resources will be compiled, complete with their longitude and latitude dimensions. The department plans to start off the exercise by April 1, 2011 and should end by March 31, 2012. The focus will initially be on villages where the drinking water condition is really bad in summer and this data will be mapped within …

Ahmedabad to have tree census...

How about keeping a digital watch on the chopping of trees in the narrow lanes of Ahmedabad? Great for sure, would say tree-lovers and environmentalists. And the great idea might soon turn into reality as the Ahmedabad Municipal Corporation (AMC), Gujarat University (GU) and the state forest department have geared up to establish an electronic database after the first ever tree census in Ahmedabad.

         The initial idea is to get a concrete figure on the tree population in Ahmedabad as presently there are only some estimations and random surveys with speculative figures of the number of trees. The proposed tree census is supposed to start from the first week of May this year.

         While the census would be carried out manually, Global Positioning Sysytem (GPS) and Geographic Information System (GIS) would be put in place to get an electronic database of the types of trees and the exact number of trees in the city. At the end of the survey the database would even hold …