The Struggle we’re in TODAY

The Struggle we’re in TODAY

Today I tried to show the cash availability and queue for various ATMs in OSM map which is today’s need;)

So, here we go.

Make a file named “atm.txt” having content as follows. Actually, in this file I have taken a raw data to just test the things.

lat     lon     title   description     icon    iconSize        iconOffset
30.8791058      75.8589964      Punjab National Bank    Cash Available Rs. 2000000, Queue 750   ca.png  24,24   0,-24
30.8434801      75.8623353      Oriental Bank Of Commerce       Cash Available Rs. 1000000, Queue 600   ca.png  24,24   0,-24
30.893997       75.8581242      HDFC Bank       Cash Available Rs. 100000, Queue 100    ca.png  24,24   0,-24
30.8608311      75.8594127      Centurion Bank  Cash Available Rs. 500000, Queue 450    ca.png  24,24   0,-24
30.8782978      75.8589696      Oriental Bank Of Commerce       Cash Available Rs. 1500000, Queue 500   ca.png  24,24   0,-24
30.8609502      75.8595304      HDFC ATM        Cash Available Rs. 1000000, Queue 600   ca.png  24,24   0,-24

Add the few lines in the file slippymap.html. It means we are adding a new layer named “Cash Available” with the location of a file “atm.txt” in the same directory.

var pois = new OpenLayers.Layer.Text( “Cash Available”,
{ location:”./atm.txt”,
projection: map.displayProjection
});
map.addLayer(pois);

Now, you are done with it. Here you can see the icon and the name of the new layer <Cash Available> in the blue box.

cash

On triggering the icon once, you can see the datails of the Bank.

csh

I hope you liked it.

Have a nice day:)

 

 

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s