Advertise here

 
 
 
Total number of hits on the site :4098   Saturday, 19 Apr 2014
 
 

Advertisement

Adds by Siddhesh
Sidd Advertising
Puts your thought directly in customers brain.
Siddhesh Travels
Append wheels to your legs..get ready !
Siddhesh Rock's

MoQuotes




visitors by country counter
Country visit tracker


Like via Facebook

FindMyHome V 1.0 PDF Print E-mail
Written by Administrator   
Saturday, 20 June 2009 11:27

Why to put you guest into trouble of finding paths to your home.Why to spend time on telling your guest which direction to take to reach to your house?
Let your guest reach to your home without any hassle.Here is something exciting for your guests. Application that will help your guest to reach to your place happily.

 

First thing you should do is signup for a google map api key. You can register key by going at location

http://code.google.com/apis/maps/signup.html


Note: You need to have gmail acoount id to generate key.
This key is unique for every website URL.
You will see Text field at side of text "My web site URL:" just above generate key button.
Here you meed to give link where u need to display your map with custom paths.

Example: Suppose you want to create a page on siddhesh.co.in with name of your folder say "xyz" then you need to give link as follows
http://siddhesh.co.in/findmyhome/xxx/
within xxx, in index.html you can write your own code or you can directly give URL as


http://siddhesh.co.in/findmyhome/xxx.html and have xxx.html in findmyhome folder.

So how to start about after getting your key? Lets go...

You need to create your own code using template as follows

<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <h1> Some title...................</h1>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Some title....................</title>
    <script src="http://maps.google.com/maps?file=api&v=2&key=YOUR-KEY&sensor=true"
            type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setMapType(G_SATELLITE_MAP);
        map.setCenter(new GLatLng(LATITUDE, LONGITUDE), MAP-SIZE);
        map.setUIToDefault();
        map.enableGoogleBar();
        
        var polyline = new GPolyline([new GLatLng(LATITUDE, LONGITUDE),new GLatLng(LATITUDE, LONGITUDE)], "#ff0000", LINE_WIDTH);
        var polyline2 = new GPolyline([new GLatLng(LATITUDE, LONGITUDE),new GLatLng(LATITUDE, LONGITUDE)], "#ff0000", LINE_WIDTH);
        --------------
        --------------
        
        
        map.addOverlay(polyline);
        map.addOverlay(polyline2);    
        --------------
        --------------
        
        map.addOverlay(new GMarker(new GLatLng(LATITUDE, LONGITUDE)));
      }
    }

    </script>
  </head>
  <body onload="initialize()" onunload="GUnload()">
    <div id="map_canvas" style="width: 700px; height: 500px"></div>
  </body>
</html>

Some variables
MAP-SIZE = integer value leass then 15
LINE_WIDTH = line width , ideally 10
    
Lets run through template to understand somethings
1)      var map = new GMap2(document.getElementById("map_canvas"));
        map.setMapType(G_SATELLITE_MAP);
        map.setCenter(new GLatLng(LATITUDE, LONGITUDE), MAP-SIZE);
        map.setUIToDefault();
        map.enableGoogleBar();
        
We create map object, set it to a satellite map, set center of map, and add search features using "map.enableGoogleBar(); "

2)      var polyline = new GPolyline([new GLatLng(LATITUDE, LONGITUDE),new GLatLng(LATITUDE, LONGITUDE)], "#ff0000", LINE_WIDTH);
        var polyline2 = new GPolyline([new GLatLng(LATITUDE, LONGITUDE),new GLatLng(LATITUDE, LONGITUDE)], "#ff0000", LINE_WIDTH);
We need to mark lines between two points on the road. We create poly lines set coordinates, colour and width

3)      map.addOverlay(polyline);
        map.addOverlay(polyline2);  
We add lines on map.

4)      map.addOverlay(new GMarker(new GLatLng(LATITUDE, LONGITUDE)));
Optionally we add marker , may be at two places, at source and at destination.

Ideally, you can have one marker inserted at your house (marker_1) and one at other point may be a city bus stand, or junction, from where your house can be reached
(marker_2).and you can set center map cordinates to other end(marker_2).
cordinates means LATITUDE, LONGITUDE.

Now..Important thing, how to get lattitudes and Langitudes?


Go to http://siddhesh.co.in/findmyhome/public_test and get them, how much, how many that you want.

Once you are done with your code send mail to This e-mail address is being protected from spambots. You need JavaScript enabled to view it with code and URL, to have your map running live on server.
 
Its freeeeeeeeeeeeeeeeee....! Try it. Enjoy.Smile

COMMENTS

avatar sridhar
+2
 
 
Sidd.. Excellent article. I will definitely use it to make my home map. Thnks for posting such article
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar Girish k
+1
 
 
Awsome Awsome !!!!!!!!!!!!!!!!!!!!!!
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar Newman
+5
 
 
Excellent info, Doesn't it slow down the website?
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar Volric
0
 
 
Sure will try this out :) .This is great piece of work by Siddhesh.It will help many of my friends and to be friends to find their way to my house :)
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar runescape gold
+5
 
 
So many words,I will feel scared,I think more pictures will be better.But it is just my opinion ,depends on you!
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar osvaldo baiano
+5
 
 
I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar visão do carro
+5
 
 
very interesting information, thanks
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar Assessoria Juridica
+5
 
 
I am really interested in this program but I do not know much about it. After reading your article, i have more experiences to work with it. Your post is interesting and picturesque. I hope i can get your post in next time. Keep on!

submit articles
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar Leandro
+6
 
 
You've got a great way of communicating with the reader, a great way of making me feel like what you have to say is just as important to me as it is to you. Keep it up!
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
avatar belzinha
+5
 
 
I love this blog. I will be looking forward your next post!
DATETIMEFORMAT
POST_REPLY
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
SUBMIT_COMMENT
Cancel
NAME *
EMAIL_VERIFICATIONS_REPLIES
CODE   
Thanks for your valuable Comment.
ChronoComments by Joomla Solutions
SUBMIT_COMMENT
Last Updated on Saturday, 01 August 2009 07:27
 
 
Advertise here