• The Facebook Platform

Results 1 to 1 of 1
  1. #1
    Join Date
    Jan 2016
    Posts
    33
    Points
    84.00
    Rep Power
    35

    youtube Google Maps - Class 2 Humari btai hui destination set krna

    Assalam o aliekum dosto kesay hain aap sab.. ye mera Google Maps ka dusra tutorial hy agar aapny pehla tutorial nahi dekha to please aap pehly usay check karein kyu k us may main sari basics btai hain ab may dubara unko explain nahi karu ga taa k hu srif usi bat pe focus kar sakein jo new hy..










    Dosto google map google walon ki bnai hui ek API hy jo humy humari website k pages may google maps ko use karny deti hai, jesay apny dekha hoga k bht say businesses jesay k food resturaunts, banks ki websites may google map lga k btaya geya hota hy k resturaunt kahn hy to humari website k page may wo google map hum esi API ko use kar k lgaty hain.


    es lecture may hum apni btai hui destination per Google Map ko center karein gay or zoom level bhi set karein gay.


    1-Sab say pehly aap us jagah k co-ordinates yani k Latitude or Longitude pta karein jis jgaha ko aapny map may show karwana hy,es k lye aapky pas option hain
    Google Earth Software
    Google Maps

    Google earth say kam thora lamba hy es lye hum Google maps pe aatay hain. es link pe jaa k google map open karein
    https://www.google.com/maps/
    espy janay say google map open ho jye ga or center hoga United States...


    2-May yahn search bar may lahore likhun ga.. or jb Lahore open ho jaye ga to may apni marzi ki ksi bhi jagah pe chala jaoun ga map may he...........Ab farz karein may ksi esi jgah pe pohncha hu jo mje map may show karwani hy usky lye ab mje us jagah ki Latitude or Longitude ki value nikalni hy.


    3-Latitude Longitude maths k concepts hain unko chorein :-D ye zameen pe mojood ksi bhi jagah ka muaam btaty hain..Map may mojood ksi bhi jagah ki ye values nikalny k lye us jagah pe click karein....Simple Click.... nichay mid may ek chota sa dialog box open ho jaye ga us may ye values hongi... may ny jo picture dikhai hy wo lahore k golf club ki hy... nichay longitude or latitude hain screen k mid may jo dialog box hy...
    Pehli value = Latitude
    Dusri Value = Longitude

    enko note kar lein..


    Ab javascript may aatay hain... initialize k function may by default ye code hy:
    <script>
    function initialize() {
    var mapProp = {
    center:new google.maps.LatLng(
    51.508742,-0.120850),
    zoom:5,
    mapTypeId:google.maps.MapTypeId.ROADMAP
    };
    var map=new google.maps.Map(document.getElementById("googleMap "),mapProp);
    }
    google.maps.event.addDomListener(window, 'load', initialize);
    </script>



    yahn center k naam say jo key hy us may hum values change kardein gay.. Latitude ki jagah latitude or longitutude ki jagah longitude lgaein..


    <script>
    function initialize() {
    var mapProp = {

    center:new google.maps.LatLng(31.557885,74.359675),
    zoom:15,

    mapTypeId:google.maps.MapTypeId.ROADMAP
    };
    var map=new google.maps.Map(document.getElementById("googleMap "),mapProp);
    }
    google.maps.event.addDomListener(window, 'load', initialize);
    </script>



    yahn may ny values laga k Zoom level ko 15 kar dia hy.... agar aap ziada value enter karty hain to zoom in hoga or kam value say zoom out.
    Page ko refresh karein to map ka center golf club pe hoga.


    Dosto es tarah hum map ka center set karty hain.. agly lecture may hun Marker lganay k baray may seekhein gay..


 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •