Can i loop through list of latitude and longitude and create markers then add them on the map? Imagine a scenario where you have lat and long position on your DB how do you use them as marker on using the plugin? I tried for each but it does work.
I get that, but imagine i have latitudes and longitudes values stored on the DB and I query them and i get 100+ back, how do i loop through query result and add them to map as marker?
You would just do a foreach statement and set the coordinates for each iteration of the loop and also make sure to do a GMaps::add_marker($marker) each time. Hope that makes sense.
I have been searching the web to see if there is solution for this error but i now get this error -- Non-static method FarhanWazir\GoogleMaps\GMaps::add_marker() should not be called statically any idea why?
I'm using google map in my Laravel project, the map shows 'This Page Can't load Google Map correctly'. The API key is provided by the team, is this problem only relate to the API keys or is there something wrong with my local project environment?
Very good tutorial, tnx, I need to get the lat and lon of some places via map, and store it in fields. For example let the user to find all hospitals around the city via Google map, click on them and get their lat and lon in javascript and store in lat and lon fields. Can I do this by this package?
hi, Im having an issue, a js error saying that I had exceed the request quota por this api. Not sure what it means, since I had made less than 10, it just worked fine the first time, after that, all other times it gives this error, and also gives an alert saying "this page can no load Google maps correctly", and after i hit OK, then I'm able to see the map, it is correctly located, but it does have a watermark over the whole map, with a text saying "for development purposes only" Not sure what I am doing wrong also, markers are not working, neither the database store process even when the migratiosn were run without any errors.
Hi sir Andre. This is a very useful video. But I have a question. How can I get the 29.9km or the distance (15:16) and store it in a variable? I am looking forward for your help sir. Thanks!
got this error: Argument 2 passed to with() must be callable or null, array given, called in googleMapsTest outes\web.php on line 28. 24:$gmaps = new GMaps(); 25: $gmaps->initialize($config); 26: 27: $map = $gmaps->create_map(); 28: return view('welcome')-with('map', $map); any idea whats wrong?
Hello Andre. I am having problems with your google maps tutorial using laravel. When requesting via composer I had the error: "Loading composer repositories with package information Updating dependencies (including require-dev) Your requirements could not be resolved to an installable set of packages. Problem 1 - laravel/framework 5.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system. - Installation request for farhanwazir/laravelgooglemaps dev-master -> satisfiable by farhanwazir/laravelgooglemaps[dev-master]. - Conclusion: remove laravel/framework v6.5.1 - Conclusion: don't install laravel/framework v6.5.1 - farhanwazir/laravelgooglemaps dev-master requires laravel/framework 5.* -> satisfiable by laravel/framework[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev]. - Can only install one of: laravel/framework[5.5.x-dev, v6.5.1]. - Can only install one of: laravel/framework[5.6.x-dev, v6.5.1]. - Can only install one of: laravel/framework[5.7.x-dev, v6.5.1]. - Can only install one of: laravel/framework[5.8.x-dev, v6.5.1]. - Can only install one of: laravel/framework[5.1.x-dev, v6.5.1]. - Can only install one of: laravel/framework[5.2.x-dev, v6.5.1]. - Can only install one of: laravel/framework[5.3.x-dev, v6.5.1]. - Can only install one of: laravel/framework[5.4.x-dev, v6.5.1]. - Installation request for laravel/framework (locked at v6.5.1, required as ^6.2) -> satisfiable by laravel/framework[v6.5.1]. To enable extensions, verify that they are enabled in your .ini files: - C:\php\php.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode. Installation failed, reverting ./composer.json to its original content." Can you help me? Thanks
I have a real estate api coming with lat, lon data... how can I do it on Laravel website without importing vue and adding pins and modals on the reactive map?
Same error. I use Laravel 5.8 but think there are something wrong with the package. The google console give me some warning like NoAPiKeys and SensorNotRequired. I set my api key and the same warning.
Hello Sir, great tutorial, but I encountered a problem as I was adding google maps on my laravel application. The error message was "This page can't load Google Maps correctly. Do you own this website?". How can I solve this? Thank you.
@@Angute1 ok then first tell me,did you see the map of any country or city, and if you are watching only the blue screen on map, then zoom out your google map
@@user-eh5yw3dc8s You save it latitude an longitude as two diferent columns with the point type. When you select them , do something like this, SELECT * FROM X(longitude), Y(latitude_name)
Thanks for the video.. but can you answer me? why when i do make "php artisan migrate" the database only have 2 tables.. (migrations and user).. can you help me about this one? thankyou
The Chart API (which shows the dynamic markers) is officially deprecated as of Mar 14. I haven't found an alternative :(. My solution was to serve the images for my markers myself.
Hi Andre, I'm using microsoft visual code, and I'm stuck after the geo caching, how do you open the sequel pro? is it an additional software need to be installed?
Sequel Pro is just what I use to manage my database. If you're on a mac, it's free. For geocoding, it currently doesn't work but I've put in a PR to the package to fix the issue. Hopefully, the maintainer can merge it in.
Google changed something in their API so the geocoding doesn't work. I've put a PR in the GitHub repo but the maintainer hasn't merged it yet. You can manually change the code yourself and it should work.
Hello man, Nice video tutorial... Thank you.. I have this error: ErrorException (E_WARNING) Class 'FarhanWazir\GoogleMaps\Facades\GMapsFacade' not found I did everything you said in the video.
@@Edyl07 our requirements could not be resolved to an installable set of packages. Problem 1 - laravel/framework 5.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system. - Installation request for farhanwazir/laravelgooglemaps dev-master -> satisfiable by farhanwazir/laravelgooglemaps[dev-master]. - Conclusion: remove laravel/framework v7.15.0 - Conclusion: don't install laravel/framework v7.15.0 - farhanwazir/laravelgooglemaps dev-master requires laravel/framework 5.* -> satisfiable by laravel/framework[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev]. - Can only install one of: laravel/framework[5.5.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.6.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.7.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.8.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.1.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.2.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.3.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.4.x-dev, v7.15.0]. - Installation request for laravel/framework (locked at v7.15.0, required as ^7.0) -> satisfiable by laravel/framework[v7.15.0]. To enable extensions, verify that they are enabled in your .ini files: - /usr/local/etc/php/7.4/php.ini - /usr/local/etc/php/7.4/conf.d/ext-opcache.ini - /usr/local/etc/php/7.4/conf.d/php-memory-limits.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
$config['center'] = 'auto'; is working but, my this code not working "$config['center'] = 'Air Canada Centere, Toronto';", i write same code all in route, but it not go on the given location, plz help
There's currently an issue with geocoding that's recently changed. I put in a pull request to the package that fixes it. You can see it on the GitHub repo.
you said "You can see it on the GitHub repo", mean i install that package on my project again, if i install again, then it will work correctly or not, please respond must, thanks in advance.
When enabling geocaching and after migrating tables I see (when refreshing page): ErrorException (E_NOTICE) Trying to get property of non-object And the following line is highlighted: return array($geocache->latitude, $geocache->longitude); Any ideas on how to fix? Thanks, other wise works well :)
i get error when i run .Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details. what wrong with my code?
i have an issue "Non-static method FarhanWazir\GoogleMaps\GMaps::initialize() should not be called statically, assuming $this from incompatible context"
Hello Andre!!!. Can you help me about store locator in laravel???? I can't make it. I can make it with php, but i can't make it in laravel. Thank you so much.
Not work with php 7+ laravel 7 our requirements could not be resolved to an installable set of packages. Problem 1 - laravel/framework 5.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system. - Installation request for farhanwazir/laravelgooglemaps dev-master -> satisfiable by farhanwazir/laravelgooglemaps[dev-master]. - Conclusion: remove laravel/framework v7.15.0 - Conclusion: don't install laravel/framework v7.15.0 - farhanwazir/laravelgooglemaps dev-master requires laravel/framework 5.* -> satisfiable by laravel/framework[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev]. - Can only install one of: laravel/framework[5.5.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.6.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.7.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.8.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.1.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.2.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.3.x-dev, v7.15.0]. - Can only install one of: laravel/framework[5.4.x-dev, v7.15.0]. - Installation request for laravel/framework (locked at v7.15.0, required as ^7.0) -> satisfiable by laravel/framework[v7.15.0]. To enable extensions, verify that they are enabled in your .ini files: - /usr/local/etc/php/7.4/php.ini - /usr/local/etc/php/7.4/conf.d/ext-opcache.ini - /usr/local/etc/php/7.4/conf.d/php-memory-limits.ini You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
$config['center'] = '31.4661231, 74.3162962'; is working but, my this code not working "$config['center'] = 'Air Canada Centere, Toronto';", i write same code all in route, but it not go on the given location
There's been a change in the Google Maps API that breaks geocoding. I've put in a PR in the GitHub repo but the author has not yet merged it so you're going to have to manually add that line of code in.
@@drehimself i added this line as it is "$data_location = "maps.google.com/maps/api/geocode/json?address=".urlencode(utf8_encode($address))."&sensor=".$this->sensor."&key=".$this->apiKey;" but still same problem, and please also mentioned the changes in routes and in its closure function
Currently having same issue. Can't locate even using $config['center']...could you kindly let us know of the changes so that we change where needed?! Thanks
HI. First I want to thank you for making this video. it has helped a lot with my graduation project. I do have a question that maybe you can help answer. I am building a site where it will show you the nearest bars in my city. I have added 2 tables on to the gmaps_geocache_table named "name" and "type" I am trying to populate my database through sql pro, but I cant get the locations to pop up in my google maps. Do you have any idea what I should do? thank you I keep getting an SQLERROR[HY000]:General error: 1364 filed "name' doesnt have a defualt value. Thanks in advanced!
If you don't have a default value set in your migrations and you try to create a new record without specifying that field, Laravel is going to give you that error. For example: $table->string('description'); and you try to create a new record like this without specifying that field: Product::create(['name' => 'iPhone']) //this will result in error. Make sure you set a default value in your migration (or specify it when you create it): $table->string('description')->default('no description set');
OK thank you. I will give this a try. Doing so will I be able to display the names of the business from my database along with the marker? I am trying to find a way to loop through the lat and long through my database to display multiple markers. Any help would be much appreciated. Seriously though, thanks, this has helped immensely.
well yea... what you did was manually input the name and address.. I want to have name and address stored in a database and input them as a marker using foreach...
Your video is very Amazing and useful. Can you help me about distance from location A to location B. Thanks very much. I hope i will receive your answer. Have a good day!!!!
I see. Unfortunately, the package I'm using can't do that. You have to use the Distance Matrix API: developers.google.com/maps/documentation/distance-matrix. Here's a SO thread I found which does it using php: stackoverflow.com/questions/29003118/get-driving-distance-between-two-points-using-google-maps-api. Hope this helps!
When I run "php artisan vendor:publish" I don't get the option to publis gmaps :/ any idea why?
its really helpful, I much appreciate
Thanks, this was a good start for me.
Thanks for watching!
Hi Andre. It looks very interesting. Any chance you will update the tutorial to work with Laravel 8?
have you tried it with laravel 8 or 9 ?
Can i loop through list of latitude and longitude and create markers then add them on the map? Imagine a scenario where you have lat and long position on your DB how do you use them as marker on using the plugin? I tried for each but it does work.
You can use latitude and longitude coordinates like this: $marker['position'] = '43.6434661, -79.3790989';
I get that, but imagine i have latitudes and longitudes values stored on the DB and I query them and i get 100+ back, how do i loop through query result and add them to map as marker?
You would just do a foreach statement and set the coordinates for each iteration of the loop and also make sure to do a GMaps::add_marker($marker) each time. Hope that makes sense.
I have been searching the web to see if there is solution for this error but i now get this error -- Non-static method FarhanWazir\GoogleMaps\GMaps::add_marker() should not be called statically
any idea why?
I GOT IT to work!
Thank you so much for your help Andre!!
I'm using google map in my Laravel project, the map shows 'This Page Can't load Google Map correctly'. The API key is provided by the team, is this problem only relate to the API keys or is there something wrong with my local project environment?
Hi Andre thanks for the wonderful tutorial , may you tell me how to style the infowindow
Thanks for watching! I'm not exactly sure if you can.
is there any plugin for google nearby search from the provided location, for example getting bank, stores, pharmacy and how far are these in miles?
Thank you Andre in advance
Hi Andre thanks again for your tutorial, may you tell me how to integrate the current location button (that take me to My current location)in the map
Just set the location to 'auto'
For example: $config['center'] = 'auto';
NOTE: Your site has to be running on https for this to work.
This is a very useful tutorial !!! Thanks....
Thanks for watching!
Very good tutorial, tnx, I need to get the lat and lon of some places via map, and store it in fields. For example let the user to find all hospitals around the city via Google map, click on them and get their lat and lon in javascript and store in lat and lon fields. Can I do this by this package?
This is pretty cool! Thanks.
Thanks for watching!
hi, Im having an issue, a js error saying that I had exceed the request quota por this api. Not sure what it means, since I had made less than 10, it just worked fine the first time, after that, all other times it gives this error, and also gives an alert saying "this page can no load Google maps correctly", and after i hit OK, then I'm able to see the map, it is correctly located, but it does have a watermark over the whole map, with a text saying "for development purposes only" Not sure what I am doing wrong
also, markers are not working, neither the database store process even when the migratiosn were run without any errors.
Duplicating rows: Cmd+C, Cmd+V or Cmd+Shift+D :)
Can't live without it!
Does this location come from GPS or IP address? thanks for your time
Does this library still works now 2021 on Laravel 8?
I have same question beecouse for me the package was abandoned... 😞
Hi sir Andre. This is a very useful video. But I have a question. How can I get the 29.9km or the distance (15:16) and store it in a variable? I am looking forward for your help sir. Thanks!
Did you got the help dude?
got this error: Argument 2 passed to with() must be callable or null, array given, called in googleMapsTest
outes\web.php on line 28.
24:$gmaps = new GMaps();
25: $gmaps->initialize($config);
26:
27: $map = $gmaps->create_map();
28: return view('welcome')-with('map', $map);
any idea whats wrong?
Hello Andre.
I am having problems with your google maps tutorial using laravel.
When requesting via composer I had the error:
"Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework 5.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- Installation request for farhanwazir/laravelgooglemaps dev-master -> satisfiable by farhanwazir/laravelgooglemaps[dev-master].
- Conclusion: remove laravel/framework v6.5.1
- Conclusion: don't install laravel/framework v6.5.1
- farhanwazir/laravelgooglemaps dev-master requires laravel/framework 5.* -> satisfiable by laravel/framework[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
- Can only install one of: laravel/framework[5.5.x-dev, v6.5.1].
- Can only install one of: laravel/framework[5.6.x-dev, v6.5.1].
- Can only install one of: laravel/framework[5.7.x-dev, v6.5.1].
- Can only install one of: laravel/framework[5.8.x-dev, v6.5.1].
- Can only install one of: laravel/framework[5.1.x-dev, v6.5.1].
- Can only install one of: laravel/framework[5.2.x-dev, v6.5.1].
- Can only install one of: laravel/framework[5.3.x-dev, v6.5.1].
- Can only install one of: laravel/framework[5.4.x-dev, v6.5.1].
- Installation request for laravel/framework (locked at v6.5.1, required as ^6.2) -> satisfiable by laravel/framework[v6.5.1].
To enable extensions, verify that they are enabled in your .ini files:
- C:\php\php.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Installation failed, reverting ./composer.json to its original content."
Can you help me?
Thanks
That's a great, and thank you very much.
I have a real estate api coming with lat, lon data... how can I do it on Laravel website without importing vue and adding pins and modals on the reactive map?
It no longer works, the map gives error.
Error: "This page cannot load Google Maps correctly."
For development purposes only
Did you set your API key?
sir I got this error "This page can't load Google Maps correctly.
Do you own this website?" i have also tried many solution from stackoverflow or etc
same error should be laravel
version
developers.google.com/maps/documentation/javascript/get-api-key?hl=es
Same error.
I use Laravel 5.8 but think there are something wrong with the package. The google console give me some warning like NoAPiKeys and SensorNotRequired. I set my api key and the same warning.
Package doesn't support in laravel 7. :(
My center doesnt to be working.. my map view just appearing in middle of sea..?
i have followed all your steps but getting this error
Class 'Fideloper\Proxy\TrustProxies' not found
i also tried all ways to solve this error
fantastic tutorial! Everything is clear and to the point. Thanks, man)
Thanks for watching!
I got little confused
when you just search for the file because I'm so new to this. I don't even know where that file exists sometimes
Hello Sir, great tutorial, but I encountered a problem as I was adding google maps on my laravel application. The error message was "This page can't load Google Maps correctly. Do you own this website?". How can I solve this? Thank you.
Having the same problem, did you find a solution?
@@Angute1 dear, first get your google map api key, its free for developers
@@umairali2360 thanks, but i already got the API key, still not working...
@@Angute1 ok then first tell me,did you see the map of any country or city, and if you are watching only the blue screen on map, then zoom out your google map
@@umairali2360 like when i open it the first time, it shows, when i reload, i see the blue screen and it can't zoom out or in...
can i add marker at my controller instead at route?
how to use it in Controler? Class 'App\Http\Controllers\GMaps' not found :-(
I have syntax error, unexpected 'class' (T_CLASS) what should I do? D:
How to check my places ( areas) in Google map
Is it possible to add center using latitude and longitude ??
is there a tutorial on creating map location CRUDs with mysql Laravel? I really need the tutorial.
ask for the answer
Well, it all depends on if you want a tutorial on ORMs or in Eloquent class? Another thing what is your app suppossed to do?
@@raycoustum How do I create a location point using mysql database?
@@user-eh5yw3dc8s You save it latitude an longitude as two diferent columns with the point type. When you select them , do something like this, SELECT * FROM X(longitude), Y(latitude_name)
@@raycoustum can you teach me and give a video tutorial?
@@user-eh5yw3dc8s I have never seen a tuto with all that topics, but i dont kow where could send to you videos without been marked as spam.
It is not working in laravel 5.8 !
Any suggestion , Plz?
Sir on local server system can I run on it Mobile
Google Maps JavaScript API warning: SensorNotRequired getting this error please help
class GMaps not found
Amazing! Thanks!
Thanks for watching!
Can I use this package for business listings Laravel app? Can you name cons of this solution? Thank You for your generosity in sharing Your knowledge.
Thanks for the video..
but can you answer me? why when i do make "php artisan migrate" the database only have 2 tables.. (migrations and user).. can you help me about this one? thankyou
php artisan vendor:publish
Choose FarhanWazir\GoogleMaps\GMapsServiceProvider
Hi Andre .. for some reason i cant use location name for center lng and lat is working pls help
I use Laravel 8 and receive error. and not working in laravel 8
Marker not shown on map? is there any way to tackle this problem?
The Chart API (which shows the dynamic markers) is officially deprecated as of Mar 14. I haven't found an alternative :(. My solution was to serve the images for my markers myself.
how can we get the current location on google map
Hi Andre, I'm using microsoft visual code, and I'm stuck after the geo caching, how do you open the sequel pro? is it an additional software need to be installed?
Sequel Pro is just what I use to manage my database. If you're on a mac, it's free. For geocoding, it currently doesn't work but I've put in a PR to the package to fix the issue. Hopefully, the maintainer can merge it in.
@@drehimself i see, thanks dre for the reply. have a nice day
thank you very much...
is this still work ?
Google changed something in their API so the geocoding doesn't work. I've put a PR in the GitHub repo but the maintainer hasn't merged it yet. You can manually change the code yourself and it should work.
I did not have the googlemaps.php populate itself, what happened?
Hello man, Nice video tutorial... Thank you.. I have this error: ErrorException (E_WARNING)
Class 'FarhanWazir\GoogleMaps\Facades\GMapsFacade' not found
I did everything you said in the video.
I have the same error :(
@@gerardolucero1935 use composer require farhanwazir/laravelgooglemaps:dev-master
@@Edyl07 our requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework 5.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- Installation request for farhanwazir/laravelgooglemaps dev-master -> satisfiable by farhanwazir/laravelgooglemaps[dev-master].
- Conclusion: remove laravel/framework v7.15.0
- Conclusion: don't install laravel/framework v7.15.0
- farhanwazir/laravelgooglemaps dev-master requires laravel/framework 5.* -> satisfiable by laravel/framework[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
- Can only install one of: laravel/framework[5.5.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.6.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.7.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.8.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.1.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.2.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.3.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.4.x-dev, v7.15.0].
- Installation request for laravel/framework (locked at v7.15.0, required as ^7.0) -> satisfiable by laravel/framework[v7.15.0].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/7.4/php.ini
- /usr/local/etc/php/7.4/conf.d/ext-opcache.ini
- /usr/local/etc/php/7.4/conf.d/php-memory-limits.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
can anybody please tell me how to solve this error? "Class 'App\\Http\\Controllers\\GMaps"
Hope you figured it out! Make sure you're importing it at the top of the file.
$config['center'] = 'auto'; is working but, my this code not working "$config['center'] = 'Air Canada Centere, Toronto';", i write same code all in route, but it not go on the given location, plz help
There's currently an issue with geocoding that's recently changed. I put in a pull request to the package that fixes it. You can see it on the GitHub repo.
you said "You can see it on the GitHub repo", mean i install that package on my project again, if i install again, then it will work correctly or not, please respond must, thanks in advance.
When enabling geocaching and after migrating tables I see (when refreshing page):
ErrorException (E_NOTICE)
Trying to get property of non-object
And the following line is highlighted:
return array($geocache->latitude, $geocache->longitude);
Any ideas on how to fix? Thanks, other wise works well :)
Looks like something is null. Hope you're able to figure it out!
i get error when i run .Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.
what wrong with my code?
Try to get a new google API key.
i have an issue
"Non-static method FarhanWazir\GoogleMaps\GMaps::initialize() should not be called statically, assuming $this from incompatible context"
Hmmm... not sure. Are you using the dev-master version of the package?
Yep
solved (y)
Awesome!
how did u solve it? im having the same error
Great Video !!!
Thanks for watching!
Class 'FarhanWazir\GoogleMaps\Facades\GMapsFacade' not found
Hope you figured it out!
how to i get distance between two places and show only KiloMeters on table view?
I'm not sure, sorry!
Gracias!
Hello Andre!!!.
Can you help me about store locator in laravel????
I can't make it.
I can make it with php, but i can't make it in laravel.
Thank you so much.
I can try to help if you show me some code.
Not work with php 7+ laravel 7
our requirements could not be resolved to an installable set of packages.
Problem 1
- laravel/framework 5.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
- Installation request for farhanwazir/laravelgooglemaps dev-master -> satisfiable by farhanwazir/laravelgooglemaps[dev-master].
- Conclusion: remove laravel/framework v7.15.0
- Conclusion: don't install laravel/framework v7.15.0
- farhanwazir/laravelgooglemaps dev-master requires laravel/framework 5.* -> satisfiable by laravel/framework[5.0.x-dev, 5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.x-dev, 5.8.x-dev].
- Can only install one of: laravel/framework[5.5.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.6.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.7.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.8.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.1.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.2.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.3.x-dev, v7.15.0].
- Can only install one of: laravel/framework[5.4.x-dev, v7.15.0].
- Installation request for laravel/framework (locked at v7.15.0, required as ^7.0) -> satisfiable by laravel/framework[v7.15.0].
To enable extensions, verify that they are enabled in your .ini files:
- /usr/local/etc/php/7.4/php.ini
- /usr/local/etc/php/7.4/conf.d/ext-opcache.ini
- /usr/local/etc/php/7.4/conf.d/php-memory-limits.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
You can use "composer require drehimself/laravelgooglemaps" instead. It is the fork of this original package but has been updated for Laravel 7.
@@aleedhillon Thank you very much sir! Underrated comment
map directions also did not work, please correct it and guide us
$config['center'] = '31.4661231, 74.3162962'; is working but, my this code not working "$config['center'] = 'Air Canada Centere, Toronto';", i write same code all in route, but it not go on the given location
There's been a change in the Google Maps API that breaks geocoding. I've put in a PR in the GitHub repo but the author has not yet merged it so you're going to have to manually add that line of code in.
@@drehimself i added this line as it is "$data_location = "maps.google.com/maps/api/geocode/json?address=".urlencode(utf8_encode($address))."&sensor=".$this->sensor."&key=".$this->apiKey;"
but still same problem, and please also mentioned the changes in routes and in its closure function
Currently having same issue. Can't locate even using $config['center']...could you kindly let us know of the changes so that we change where needed?! Thanks
Thanks you.
Thanks for watching!
Hi sir, I have a problem.Google Maps JavaScript API error: InvalidKeyMapError. please solve this. I waiting for your answer.
You need a valid API key from google: developers.google.com/maps/documentation/javascript/error-messages
How do I change the design of the map? I have json file of the design.
I'm not exactly sure, I haven't used the custom style feature. Check out this demo: biostall.com/demos/google-maps-v3-api-codeigniter-library/styling
HI. First I want to thank you for making this video. it has helped a lot with my graduation project. I do have a question that maybe you can help answer. I am building a site where it will show you the nearest bars in my city. I have added 2 tables on to the gmaps_geocache_table named "name" and "type" I am trying to populate my database through sql pro, but I cant get the locations to pop up in my google maps. Do you have any idea what I should do? thank you I keep getting an SQLERROR[HY000]:General error: 1364 filed "name' doesnt have a defualt value.
Thanks in advanced!
If you don't have a default value set in your migrations and you try to create a new record without specifying that field, Laravel is going to give you that error. For example:
$table->string('description');
and you try to create a new record like this without specifying that field:
Product::create(['name' => 'iPhone']) //this will result in error.
Make sure you set a default value in your migration (or specify it when you create it):
$table->string('description')->default('no description set');
OK thank you. I will give this a try. Doing so will I be able to display the names of the business from my database along with the marker? I am trying to find a way to loop through the lat and long through my database to display multiple markers. Any help would be much appreciated. Seriously though, thanks, this has helped immensely.
@@migueltejeda3869 dear, did you clear your error then please also help me
Thanks a lot.
Thanks for watching!
thanks
you are really very awesome
(Y)
Thanks for watching!
how to show more than two place directions?
Directions usually mean between two places. If you want more, just keep chaining them on.
what is function for chaining them on
"Gigantic ho there"
GIGANTIC!! haha
btw nice tutorial, it really helped me with my homework... btw can I use foreach to put multiple marker from a table in my database?
Absolutely. That's what I'm doing in my application.
well yea... what you did was manually input the name and address.. I want to have name and address stored in a database and input them as a marker using foreach...
@@drehimself Google Maps JavaScript API warning: SensorNotRequired getting this error please help
Your video is very Amazing and useful. Can you help me about distance from location A to location B. Thanks very much. I hope i will receive your answer.
Have a good day!!!!
Thanks for watching! What's the issue you're having?
You can help me about how to calculate the distance from location A to location B.
And help user find min distance.
Thank you so much!!!
I see. Unfortunately, the package I'm using can't do that. You have to use the Distance Matrix API: developers.google.com/maps/documentation/distance-matrix. Here's a SO thread I found which does it using php: stackoverflow.com/questions/29003118/get-driving-distance-between-two-points-using-google-maps-api. Hope this helps!
thank for sharing
Is this API is free or we need to purchase ?
very useful
Thanks for watching!
Hey you are great :-)
solve that
good
cool (Y)
Hi Andre. It looks very interesting. Any chance you will update the tutorial to work with Laravel 8? (2)