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... Наука
This is exactly what I was looking for ! Thanks a lot !
Welcome.
Thank you so much for this! ive been searching for this and finally got the right video. YOU DESERVE A SUBSCRIBE
Thank you 🙂
did it work?
thankyou this was so helpful.
Thank you so much bro, usefull content
what if we want 2 locations and we want to mark a line between those 2 locations?
thank you so much bro. Finally found it i have been looking for
You are welcome.
Thank you , Its exact example which I was Looking.
You are welcome.
Perfect ... thanks bro
This is exactly what I was looking for! Thanks a lot!🙏🏼🙏🏼🙏🏼🙏🏼🙏🏼🥰🥰🥰🥰🥰🥰🥰
You are welcome.
Is it posible to make 2 adress the distance the total distance
thanks bro its very helpful to me and assignments 🙂
Glad to hear it.
OMG, thank you so much
You are welcome.
Really Help ful.. Thank you
It's solve my big issue. Thanks again
You are welcome.
@@AdnanAfzal565 How can i contact you MR. Adnan Afzal ?
Thanks you sirrr!!
You are welcome.
thank you bro It helped me a lot...
You're welcome
Thank you so much.
You're welcome!
Woow very helpful thank uu!
You are welcome.
very useful, thank you
You are welcome!
I got it, thanks a lot!
You are welcome.
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!
Yes, if you get the coordinates of water sensor (latitude and longitude) then yes it can be used.
what if i want to know the longitude and langitude just using a spesific address?
For that, you need to use Google Maps API.
wonderful indeed 🥰🥰🥰🥰 helpful
Thanks.
Thanks a lot !
You are welcome.
Thank you bro!
You are welcome.
thank you sir
You are welcome.
Thank You
You are welcome.
Very useful
Thanks.
very nice brother
bro can i see the map but not marker the my location please help me
can i grab with PHP the latitude and longitude when i click on a location on the map?
Not using this script. You need to use google maps javascript API:
developers.google.com/maps/documentation/javascript/tutorial
thank you
You are welcome.
When I add Latt,Long the marker doesnt appear. when i give an exact address, it does.
There must be some error in your code. You need to follow this part carefully:
ruclips.net/video/3yolzQ6JnAc/видео.html
Thanks friend! Can the src be manipulated with pure client-side JS without server-side PHP.?
Yes, it can be created with javascript from the following code:
var = document.createElement("");
.setAttribute("src", src);
document.body.appendChild();
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)
Are you receiving array with latitude and longitude ?
@@AdnanAfzal565 Nope, I just need to show the address on the map
Genial.
Thanks.
i want the user to enter the country names and the system calculates the distance between them.can you help?
You can do this using Google Maps API:
cloud.google.com/blog/products/maps-platform/how-calculate-distances-map-maps-javascript-api
Good
Thanks.
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?
You can get the location following this tutorial. And you can save it in database following: ruclips.net/video/UDmAlpYVwbU/видео.html this.
are the direction on the top right corner can be used? just like google maps?
Yes, it can be used via Directions API.
@@AdnanAfzal565 so it will direct to google maps app or you can create your own directions?
On clicking that button you will be redirected to google maps. To create own directions, you need to use Directions API.
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?
Yes, for that you need to create an Android app. Android already provides an API for Geolocation.
do you have an example of with route of two points on the map? Thanks
No. That can be achieved using google maps api.
@@AdnanAfzal565 Is there no solution to show 2 points on the map for free? Thanks
Not that I know. But you can search if you found any.
can distance be calculated?
between two coordinates without using API keys
Not in my knowledge. But you can use directions API and it requires API key.
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
That can be done via google maps API.
Excuse me, how to change the maps types to SATELLITE or TERRAIN?
You can try sending "type" in the URL as parameter.
how we can save this longitude and latitude in database and then transfer to another user?
You can follow this to save in database:
ruclips.net/video/oie6T8IVeMA/видео.html
@@AdnanAfzal565 we are working on a mini project but we don't know how to share or show these coordinates to other user.
You can save in database with id of other user.
@@AdnanAfzal565 and it can be displayed to other user?
Is this considered consuming and API?
No, it does not consume API.
Please how to frame an area in map using coordinates ?!
Do you have any example ?
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...
If you want a function that does this work, then you must need an external script.
@@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!
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
For that, you need to use google maps API.
@@AdnanAfzal565 any video on Google maps API from you
@@mohammadshafi6768 No sorry, I haven't created a video on that yet.
guru master thank you very much... can you create a video with sample database on it ...
You're welcome.
If you want to save latitude and longitude in database, you can follow this:
ruclips.net/video/UDmAlpYVwbU/видео.html
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 ?
Yes, you can pass "z=14" in the src attribute and it will be zoomed accordingly.
after some search you have to add a z parameter , &z= (value between 1 to 20)
@@lifeforce3451 yes
How to track deliver on map without google api keys
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.
Try entering location in a specific way.
What location are you trying to enter ?
@@AdnanAfzal565 what i get is: '?>php echo $address;' in the map search box...question: do i need to change the editor?
This is a syntax error. You can paste your code here, and I will correct the syntax.
@@AdnanAfzal565.....
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/
Thanks Master.. if you dont mind please teach me how to get distance from first address to destination. Jazakallah khoir
For that you need to use google places API.
How to display more than one location at the same time
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
is there a Laravel version?
No, but it is in core php, so it can be used with laravel.
really impressive..
could you please tell me how can I get latitude and longitude from the map location.
Map location means string address ?
Sir Can We Find Location through upload video.I mean the up-loader of the video location. please sir tell me
For that you need to use navigator browser API to get the permission for accessing the location
@@AdnanAfzal565 Can You Make Tutorial please Sir
You want to get the user’s location from browser permission, right ?
@@AdnanAfzal565 yes sir can you help me
@@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
how do i get this source code?
You can get from link in the description.
@@AdnanAfzal565 there is no source code, only link of picture.
@@AdnanAfzal565 sorry it was there, i got it.
:)
hi, great video! will i be able to get the distance bet 2 addresses using your script?
Yes.
@@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.
For this you need to use geolocation API in javascript.
Thanks you are great♡i wanna ask you can i do that with laravel??
Yes you can!
@@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
Yes, you need to create a route and a controller function.
@@AdnanAfzal565 thanks and sorry for all these questions but do you know any example similar to this would help me??
@@AdnanAfzal565 i dont know what to put in the controller🥺🥺
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.
Thanks.
You need to set your route to POST, like:
Route::post()
instead of:
Route::get()
@@AdnanAfzal565 Thanks man much love
You're welcome :)
Please make a video how to RENEW or REPLACE a Google Map API
It is not possible to completely replace the google maps API. But you can get few features for free.
but can you also make a video for how to find nearby people on map with php
For that you need to use Google API. This tutorial is for without API.
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
Yes. Using this tutorial, you will be able to find the address using simple text. Without API keys and without longitude or latitude.
how can you display a complete address (#number, street,city) using the coordinates method? ex: 14.583679575552239, 120.97416324671451 (# 84 dapitan st., Intramuros Manila)
'
For that, you need to use Google Maps API.
Can anyone send this code
You can get it from link in the description.
@@AdnanAfzal565 that show msg "file not found"
Let me check.
Kindly check now. The file has been uploaded.
not working
Check your browser console and let me know what error you are facing ?
@@AdnanAfzal565 Please, I want you to guide me on how to be perfect on this profession