Google Maps in PHP without API Key - By Coordinates & By Address

Поделиться
HTML-код
  • Опубликовано: 28 сен 2019
  • Google Maps in PHP without API Key - By Coordinates & By Address
    Demo:
    adnan-tech.com/services/show-...
    - Display map by giving address (e.g. Greenwich London) (without API key)
    - Display map by providing latitude and longitude (without API key)
    - Get address from form's input field (with spaces in the address)
    Source files:
    adnan-tech.com/google-maps-in...
  • НаукаНаука

Комментарии • 173

  • @kikou56550
    @kikou56550 4 года назад +3

    This is exactly what I was looking for ! Thanks a lot !

  • @SAM-rk2so
    @SAM-rk2so Год назад +1

    Thank you so much for this! ive been searching for this and finally got the right video. YOU DESERVE A SUBSCRIBE

  • @henakumari5632
    @henakumari5632 3 года назад +1

    thankyou this was so helpful.

  • @sabarijayaraj5077
    @sabarijayaraj5077 3 года назад +1

    Thank you so much bro, usefull content

  • @devbyishtiaq
    @devbyishtiaq 4 года назад +3

    what if we want 2 locations and we want to mark a line between those 2 locations?

  • @avilferrao8434
    @avilferrao8434 2 года назад

    thank you so much bro. Finally found it i have been looking for

  • @coding_ninja_technique
    @coding_ninja_technique Год назад +1

    Thank you , Its exact example which I was Looking.

  • @MuhammadWafi
    @MuhammadWafi 3 года назад

    Perfect ... thanks bro

  • @zimaremelaekt
    @zimaremelaekt 3 года назад

    This is exactly what I was looking for! Thanks a lot!🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🥰🥰🥰🥰🥰🥰🥰

  • @jirkauroon
    @jirkauroon 6 месяцев назад

    Is it posible to make 2 adress the distance the total distance

  • @SurajKumar-wq4nv
    @SurajKumar-wq4nv Месяц назад

    thanks bro its very helpful to me and assignments 🙂

  • @melaniemurday3138
    @melaniemurday3138 Год назад

    OMG, thank you so much

  • @mohammadshafi6768
    @mohammadshafi6768 2 года назад

    Really Help ful.. Thank you
    It's solve my big issue. Thanks again

  • @orpheustelos5561
    @orpheustelos5561 Год назад

    Thanks you sirrr!!

  • @mishajib7957
    @mishajib7957 4 года назад

    thank you bro It helped me a lot...

  • @puneetdhiman3936
    @puneetdhiman3936 4 года назад

    Thank you so much.

  • @khaoulabaeza4672
    @khaoulabaeza4672 2 года назад

    Woow very helpful thank uu!

  • @geniushomwetv9793
    @geniushomwetv9793 Год назад

    very useful, thank you

  • @ifossofi
    @ifossofi Год назад

    I got it, thanks a lot!

  • @7yearsago191
    @7yearsago191 2 года назад

    Hello, can I use this one for the purpose of having a map that shows the exact location of a water sensor for example where the data input is coming from? Thank you!

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      Yes, if you get the coordinates of water sensor (latitude and longitude) then yes it can be used.

  • @danielhaniyansasalim8244
    @danielhaniyansasalim8244 4 года назад +5

    what if i want to know the longitude and langitude just using a spesific address?

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад +2

      For that, you need to use Google Maps API.

  • @jabesstanley6603
    @jabesstanley6603 2 года назад

    wonderful indeed 🥰🥰🥰🥰 helpful

  • @oliviergousse2693
    @oliviergousse2693 2 года назад

    Thanks a lot !

  • @globalcommunity768
    @globalcommunity768 2 года назад

    Thank you bro!

  • @dadisetiadi9766
    @dadisetiadi9766 2 года назад

    thank you sir

  • @luvcitedigitalmarketingage840
    @luvcitedigitalmarketingage840 Год назад

    Thank You

  • @mamusthafa6
    @mamusthafa6 2 года назад

    Very useful

  • @flextronteck7764
    @flextronteck7764 4 года назад +1

    very nice brother

    • @flextronteck7764
      @flextronteck7764 4 года назад

      bro can i see the map but not marker the my location please help me

  • @Spiderexe
    @Spiderexe 4 года назад

    can i grab with PHP the latitude and longitude when i click on a location on the map?

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      Not using this script. You need to use google maps javascript API:
      developers.google.com/maps/documentation/javascript/tutorial

  • @waffle14days
    @waffle14days 3 года назад

    thank you

  • @travelboots1403
    @travelboots1403 4 года назад

    When I add Latt,Long the marker doesnt appear. when i give an exact address, it does.

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад +1

      There must be some error in your code. You need to follow this part carefully:
      ruclips.net/video/3yolzQ6JnAc/видео.html

  • @arwahsapi
    @arwahsapi 2 года назад

    Thanks friend! Can the src be manipulated with pure client-side JS without server-side PHP.?

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      Yes, it can be created with javascript from the following code:
      var = document.createElement("");
      .setAttribute("src", src);
      document.body.appendChild();

  • @zenfujita7381
    @zenfujita7381 4 года назад +2

    Thank you so much, it helps me a lot!
    Btw, how to show the map if the location is specific?
    (already used array to save the address)

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад +2

      Are you receiving array with latitude and longitude ?

    • @zenfujita7381
      @zenfujita7381 4 года назад

      @@AdnanAfzal565 Nope, I just need to show the address on the map

  • @Mr.Albertos
    @Mr.Albertos Год назад

    Genial.

  • @tntgangcom
    @tntgangcom 3 года назад

    i want the user to enter the country names and the system calculates the distance between them.can you help?

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      You can do this using Google Maps API:
      cloud.google.com/blog/products/maps-platform/how-calculate-distances-map-maps-javascript-api

  • @princenogueira1618
    @princenogueira1618 7 месяцев назад

    Good

  • @phyusinlinlatt2589
    @phyusinlinlatt2589 3 года назад

    Thank you for your video. For my project, I have to access user current location and save the address into database. How can I modify this?

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      You can get the location following this tutorial. And you can save it in database following: ruclips.net/video/UDmAlpYVwbU/видео.html this.

  • @jungamaroli8567
    @jungamaroli8567 3 года назад

    are the direction on the top right corner can be used? just like google maps?

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      Yes, it can be used via Directions API.

    • @jungamaroli8567
      @jungamaroli8567 3 года назад

      @@AdnanAfzal565 so it will direct to google maps app or you can create your own directions?

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      On clicking that button you will be redirected to google maps. To create own directions, you need to use Directions API.

  • @yahayamohammed7405
    @yahayamohammed7405 4 года назад

    It is really inspirational and helpful.
    Thank you for the elaboration.
    Sir, what of if I want Geolocate the area using a phone number, not only address?

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      Yes, for that you need to create an Android app. Android already provides an API for Geolocation.

  • @dev-fabriciobr
    @dev-fabriciobr Год назад

    do you have an example of with route of two points on the map? Thanks

    • @AdnanAfzal565
      @AdnanAfzal565  Год назад +1

      No. That can be achieved using google maps api.

    • @dev-fabriciobr
      @dev-fabriciobr Год назад

      @@AdnanAfzal565 Is there no solution to show 2 points on the map for free? Thanks

    • @AdnanAfzal565
      @AdnanAfzal565  Год назад

      Not that I know. But you can search if you found any.

  • @user-pf1mb2ig5x
    @user-pf1mb2ig5x 2 месяца назад

    can distance be calculated?
    between two coordinates without using API keys

    • @AdnanAfzal565
      @AdnanAfzal565  2 месяца назад

      Not in my knowledge. But you can use directions API and it requires API key.

  • @shubhangiingle9872
    @shubhangiingle9872 Год назад

    Hello I am having array of latitude and longitude and I want plot it on the same map (multiple points on the one map). is it possible ? can you make video on it ? thanks in advanced

  • @user-pk6kp8sl2b
    @user-pk6kp8sl2b 4 года назад

    Excuse me, how to change the maps types to SATELLITE or TERRAIN?

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      You can try sending "type" in the URL as parameter.

  • @freefirecapture
    @freefirecapture 4 года назад

    how we can save this longitude and latitude in database and then transfer to another user?

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      You can follow this to save in database:
      ruclips.net/video/oie6T8IVeMA/видео.html

    • @freefirecapture
      @freefirecapture 4 года назад

      @@AdnanAfzal565 we are working on a mini project but we don't know how to share or show these coordinates to other user.

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      You can save in database with id of other user.

    • @freefirecapture
      @freefirecapture 4 года назад

      @@AdnanAfzal565 and it can be displayed to other user?

  • @lucianacoelho7716
    @lucianacoelho7716 3 года назад

    Is this considered consuming and API?

  • @mouadnadzi
    @mouadnadzi Год назад

    Please how to frame an area in map using coordinates ?!

  • @OrenLikes
    @OrenLikes 4 года назад

    Hi and thank you!
    I'd like to get latlng from an address,
    inside javascript (no PHP, jQuery, etc.),
    without API key.
    Unlimited, free, no registration, not necessarily google maps...
    Is it possible?
    var latlng=getLatLng(address);
    I want this to get a distance from a set address:
    var distance(HQLatLng, getLatLng(address));
    I can calculate on my own, but it would be nice if there's a function that does that.
    Thank you!
    PS. Without loading external scripts...

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      If you want a function that does this work, then you must need an external script.

    • @OrenLikes
      @OrenLikes 4 года назад

      ​@@AdnanAfzal565
      Thank you.
      I'm trying to get LatLng from Chrome's console, maybe I can attach my script using TamperMonkey.
      I could get an external script with creatObject("script")...
      I'm not sure how to access it...
      I'm kinda using a webpage to which I have no control, reading it's data, and presenting only what I want to see.
      I wrote many scripts like this, but this one needs to get LatLng from somewhere... any suggestions? Again, I don't want to use API keys or be limited to 10 results per day - I need about 50 (for now) every time I open the page, which could be several times a day.
      I could do it manually, but it gets longer from time to time, and where's the fun in that?!? :)
      It shows a mini google map in an iFrame - which I cannot get the content of (cross-domain...).
      I can't use PHP because I'll need to open that external site in an iFrame or something = will not be able to access the data...
      Thank you, again!

  • @mohammadshafi6768
    @mohammadshafi6768 2 года назад

    I have created the map with the Help of your code. it's good. but the thing is i have to show a message when the address is not complete. for example if the user type only city name and state or pincode then the map shows a polygon area. then how do i get to know that it's an incomplete address and need to proved complete address which shows pointer on the map.
    Any Help will be appreciable

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад +1

      For that, you need to use google maps API.

    • @mohammadshafi6768
      @mohammadshafi6768 2 года назад

      @@AdnanAfzal565 any video on Google maps API from you

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      @@mohammadshafi6768 No sorry, I haven't created a video on that yet.

  • @throwbackchannel6091
    @throwbackchannel6091 4 года назад

    guru master thank you very much... can you create a video with sample database on it ...

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      You're welcome.
      If you want to save latitude and longitude in database, you can follow this:
      ruclips.net/video/UDmAlpYVwbU/видео.html

  • @lifeforce3451
    @lifeforce3451 2 года назад

    very smart I didn't think to use but is it possible to add a parameter in the url to select the level of zoom like in javascript ?

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      Yes, you can pass "z=14" in the src attribute and it will be zoomed accordingly.

    • @lifeforce3451
      @lifeforce3451 2 года назад

      after some search you have to add a z parameter , &z= (value between 1 to 20)

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      @@lifeforce3451 yes

  • @conmarttube
    @conmarttube 10 месяцев назад

    How to track deliver on map without google api keys

  • @europoamerico7605
    @europoamerico7605 4 года назад

    i'm using php on notepad++ and my localhost. But when i type an address and do submit. it don't fetch the address. it just refresh the browser and it goes back to display the world maps.In other words, it just display google maps but nothing else.

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      Try entering location in a specific way.
      What location are you trying to enter ?

    • @europoamerico7605
      @europoamerico7605 4 года назад

      @@AdnanAfzal565 what i get is: '?>php echo $address;' in the map search box...question: do i need to change the editor?

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      This is a syntax error. You can paste your code here, and I will correct the syntax.

    • @europoamerico7605
      @europoamerico7605 4 года назад

      @@AdnanAfzal565.....

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      The syntax seems fine. The problem must be in location.
      Try entering your location here:
      adnan-tech.com/services/show-location-on-google-maps-from-address-or-coordinates/

  • @anakkecilkeren9015
    @anakkecilkeren9015 3 года назад

    Thanks Master.. if you dont mind please teach me how to get distance from first address to destination. Jazakallah khoir

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад +1

      For that you need to use google places API.

  • @RishiRaj-ht8ry
    @RishiRaj-ht8ry 4 года назад

    How to display more than one location at the same time

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      If you want 2 locations, you can display one location via coordinates and second via location name. But if you want more than 2 locations, then it would be possible only via Google Maps Developer Guide:
      developers.google.com/maps/documentation/javascript/tutorial

  • @maraiiamina3575
    @maraiiamina3575 3 года назад

    is there a Laravel version?

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад +1

      No, but it is in core php, so it can be used with laravel.

  • @ziyaabbas4213
    @ziyaabbas4213 Год назад

    really impressive..
    could you please tell me how can I get latitude and longitude from the map location.

  • @driilisertugul8320
    @driilisertugul8320 3 года назад

    Sir Can We Find Location through upload video.I mean the up-loader of the video location. please sir tell me

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      For that you need to use navigator browser API to get the permission for accessing the location

    • @driilisertugul8320
      @driilisertugul8320 3 года назад

      @@AdnanAfzal565 Can You Make Tutorial please Sir

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      You want to get the user’s location from browser permission, right ?

    • @driilisertugul8320
      @driilisertugul8320 3 года назад

      @@AdnanAfzal565 yes sir can you help me

    • @driilisertugul8320
      @driilisertugul8320 3 года назад

      @@AdnanAfzal565 Sir my final year project is crime reporting system. I want when someone upload crime scene video the police station find their location in map. Sir Plz Help me

  • @freefirecapture
    @freefirecapture 4 года назад

    how do i get this source code?

  • @edgiegarcia
    @edgiegarcia 3 года назад

    hi, great video! will i be able to get the distance bet 2 addresses using your script?

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      Yes.

    • @edgiegarcia
      @edgiegarcia 3 года назад

      @@AdnanAfzal565 bro i am your avid fan. i knew only basic in php etc. if you can help me out like modifying this form when entering two addresses will show the result of getting the direction distance and time would be grately appreciated. thank you.

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      For this you need to use geolocation API in javascript.

  • @Bebe-sg4mg
    @Bebe-sg4mg 4 года назад

    Thanks you are great♡i wanna ask you can i do that with laravel??

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад +1

      Yes you can!

    • @Bebe-sg4mg
      @Bebe-sg4mg 4 года назад

      @@AdnanAfzal565 i'm facing problems with routes..do i need to make route for the submit button separated from thr route for showing the map page..plz help me

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад +1

      Yes, you need to create a route and a controller function.

    • @Bebe-sg4mg
      @Bebe-sg4mg 4 года назад

      @@AdnanAfzal565 thanks and sorry for all these questions but do you know any example similar to this would help me??

    • @Bebe-sg4mg
      @Bebe-sg4mg 4 года назад

      @@AdnanAfzal565 i dont know what to put in the controller🥺🥺

  • @tricked5722
    @tricked5722 3 года назад

    I can only use GET not POST otherwise i get "The POST method is not supported for this route. Supported methods: GET, HEAD." Im using laravel btw i dont know if that makes a diffrence and if so how do i fix this? Btw really nice simple video love this kinda style.

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      Thanks.
      You need to set your route to POST, like:
      Route::post()
      instead of:
      Route::get()

    • @tricked5722
      @tricked5722 3 года назад

      @@AdnanAfzal565 Thanks man much love

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      You're welcome :)

  • @jacobadamfondevilla3134
    @jacobadamfondevilla3134 Год назад

    Please make a video how to RENEW or REPLACE a Google Map API

    • @AdnanAfzal565
      @AdnanAfzal565  Год назад

      It is not possible to completely replace the google maps API. But you can get few features for free.

  • @henakumari5632
    @henakumari5632 3 года назад

    but can you also make a video for how to find nearby people on map with php

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      For that you need to use Google API. This tutorial is for without API.

  • @usoafreight2696
    @usoafreight2696 2 года назад

    I wish I can find one video that shows human friendly workings of multiple address usage without api and no tolls. Why does everyone have to be overly-pragmatic with longitude and latitude? We live by Street number and name and the rest is handled

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      Yes. Using this tutorial, you will be able to find the address using simple text. Without API keys and without longitude or latitude.

  • @PCNPromoproinc88
    @PCNPromoproinc88 3 года назад

    how can you display a complete address (#number, street,city) using the coordinates method? ex: 14.583679575552239, 120.97416324671451 (# 84 dapitan st., Intramuros Manila)
    '

    • @AdnanAfzal565
      @AdnanAfzal565  3 года назад

      For that, you need to use Google Maps API.

  • @hindviswarajy
    @hindviswarajy 2 года назад

    Can anyone send this code

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      You can get it from link in the description.

    • @hindviswarajy
      @hindviswarajy 2 года назад

      @@AdnanAfzal565 that show msg "file not found"

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      Let me check.

    • @AdnanAfzal565
      @AdnanAfzal565  2 года назад

      Kindly check now. The file has been uploaded.

  • @satheeshchowdary6518
    @satheeshchowdary6518 4 года назад

    not working

    • @AdnanAfzal565
      @AdnanAfzal565  4 года назад

      Check your browser console and let me know what error you are facing ?

    • @yahayamohammed7405
      @yahayamohammed7405 4 года назад

      @@AdnanAfzal565 Please, I want you to guide me on how to be perfect on this profession