farhanwazir / laravelgooglemaps Goto Github PK
View Code? Open in Web Editor NEWLaravel Google Maps Package
License: MIT License
Laravel Google Maps Package
License: MIT License
$data_location = "https://maps.google.com/maps/api/geocode/json?address=".urlencode(utf8_encode($address))."&key=".config('googlemaps.key')."&sensor=".$this->sensor;
if ($this->region != "" && strlen($this->region) == 2) {
$data_location .= "®ion=".$this->region;
}
D:\xampp\htdocs\googlemap\vendor\farhanwazir\laravelgooglemaps\src\FarhanWazir\GoogleMaps\GMaps.php
if map not working first get google api key is vailed and enable map service and for direction enable direction services and this package working with price plain of map and after these things map not still working then please go to D:\xampp\htdocs\googlemap\vendor\farhanwazir\laravelgooglemaps\src\FarhanWazir\GoogleMaps\GMaps.php
and replace code
$data_location = "https://maps.google.com/maps/api/geocode/json?address=".urlencode(utf8_encode($address))."&key=".config('googlemaps.key')."&sensor=".$this->sensor;
if ($this->region != "" && strlen($this->region) == 2) {
$data_location .= "®ion=".$this->region;
}
if working on server enable file_get_contents and any js changes of google map js related file is
D:\xampp\htdocs\googlemap\vendor\farhanwazir\laravelgooglemaps\src\FarhanWazir\GoogleMaps\GMaps.php
for help
http://biostall.com/demos/google-maps-v3-api-codeigniter-library/
How can I show "x" address written in an input in my template? is there any more detailed documentation?
Show Class jsmin does not exist when i make true to minifyJS
laravel/framework 5.0.x-dev requires ext-mcrypt * -> the requested PHP extension mcrypt is missing from your system.
Conclusion: remove laravel/framework v6.0.1
Do you plan an update for laravel 6.
Hi,
How to add a function on marker['onclick'] in my PHP?
something like this..
$marker['onclick'] = function () { redirect('google.com'); };
Dear sir,
it is not working in laravel 7.0 please fix the issue
Regards...
hi there, i want to ask is there any sample that i can refer to create a dynamic drawing polygon and save it to my db for other request?
The geocode caching into a Database (MySQL via phpMyAdmin) for Laravel is currently not possible even after resolving the geocode issue that came with change from Google Maps API. Kindly assist
Problem 1
- Root composer.json requires farhanwazir/laravelgooglemaps ^2.3 -> satisfiable by farhanwazir/laravelgooglemaps[2.3, ..., 2.3.9].
- farhanwazir/laravelgooglemaps[2.3, ..., 2.3.9] require laravel/framework 5.* -> found laravel/framework[v5.0.0, ..., v5.8.38] but it conflicts with your root composer.json require (^10.8).
You can also try re-running composer require with an explicit version constraint, e.g. "composer require farhanwazir/laravelgooglemaps:*" to figure out if any version is installable, or "composer require farhanwazir/laravelgooglemaps:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Did all of the above but nothing worked.
I have this in my controller which basically will do is to send a pop up telling the latitude and longitude...
public function getMap() { $config['center'] = '9.562389, 44.077011'; $config['zoom'] = '14'; $config['map_height'] = '500px'; $config['scrollwheel'] = false; $config['onclick'] = 'alert(\'You just clicked at: \' + event.latLng.lat() + \', \' + event.latLng.lng());'; $gmaps = new GMaps($config); $gmaps->initialize($config); $map = $gmaps->create_map(); return view('admin.mapTest')->with('map', $map); }
so my question is... how to send the latitude and longitude to another controller?
note: forexample i wann create save that clicked map
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
VirtualAlloc() failed: [0x00000008] Not enough memory resources are available to process this command.
Please help me.
I use Laravel 8 and receive error.
Hi when i try to install in PHP 7.2.19 i found this
To enable extensions, verify that they are enabled in your .ini files:
- C:\laragon\bin\php\php-7.2.19-Win32-VC15-x64\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.
i read about this :
This feature was DEPRECATED in PHP 7.1.0, and REMOVED in PHP 7.2.0.
Alternatives to this feature include:
Sodium (available as of PHP 7.2.0)
OpenSSL
Can you do some FIX to this can work with Laravel 6 in php 7.2
Kind Regards
Where can we see the API?
Is not working in laravel 7.0
" - Conclusion: don't install laravel/framework v7.17.2"
Is there any documentation how to set Marker by Lat & Long, and also How to make gmaps marker set by click? Thanks
in Application.php line 612
at Application->resolveProvider('FarhanWazir\GoogleMaps\GmapsServiceProvider')in Application.php line 570
at Application->register('FarhanWazir\GoogleMaps\GmapsServiceProvider')in ProviderRepository.php line 75
at ProviderRepository->load(array('Illuminate\Auth\AuthServiceProvider', 'Illuminate\Broadcasting\BroadcastServiceProvider', 'Illuminate\Bus\BusServiceProvider', 'Illuminate\Cache\CacheServiceProvider', 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 'Illuminate\Cookie\CookieServiceProvider', 'Illuminate\Database\DatabaseServiceProvider', 'Illuminate\Encryption\EncryptionServiceProvider', 'Illuminate\Filesystem\FilesystemServiceProvider', 'Illuminate\Foundation\Providers\FoundationServiceProvider', 'Illuminate\Hashing\HashServiceProvider', 'Illuminate\Mail\MailServiceProvider', 'Illuminate\Notifications\NotificationServiceProvider', 'Illuminate\Pagination\PaginationServiceProvider', 'Illuminate\Pipeline\PipelineServiceProvider', 'Illuminate\Queue\QueueServiceProvider', 'Illuminate\Redis\RedisServiceProvider', 'Illuminate\Auth\Passwords\PasswordResetServiceProvider', 'Illuminate\Session\SessionServiceProvider', 'Illuminate\Translation\TranslationServiceProvider', 'Illuminate\Validation\ValidationServiceProvider', 'Illuminate\View\ViewServiceProvider', 'Laravel\Tinker\TinkerServiceProvider', 'Tymon\JWTAuth\Providers\JWTAuthServiceProvider', 'App\Providers\AppServiceProvider', 'App\Providers\AuthServiceProvider', 'App\Providers\EventServiceProvider', 'App\Providers\RouteServiceProvider', 'Intervention\Image\ImageServiceProvider', 'FarhanWazir\GoogleMaps\GmapsServiceProvider'))
public $enableFullScreenControl = false; // If set to TRUE will enable full screen control
//Added for full screen control
if ($this->enableFullScreenControl) {
$this->output_js_contents .= ',
fullscreenControl: true';
}
i faced a probleme, "Non-static method FarhanWazir\GoogleMaps\GMaps::initialize() should not be called statically, assuming $this from incompatible context".
can u take a look at it, im using laravel 5.4 with php 5*
Hello,
i have this problem:
Google Maps JavaScript API error: ApiProjectMapError
Can you help me?
When trying to use the wrapper in https mode
the map does not display
a simple change in
$apiLocation = 'http://maps.googleapis.com/maps/api/js?key='.$this->apiKey.'&sensor='.$this->sensor;
to
$apiLocation = 'https://maps.googleapis.com/maps/api/js?key='.$this->apiKey.'&sensor='.$this->sensor;
it will fix the issue
please tell me how to use auto complete with laravel
j'ai un problème : Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for farhanwazir/laravelgooglemaps ^2.3 ->
satisfiable by farhanwazir/laravelgooglemaps[2.3, 2.3.0.x-dev, 2.3.1, 2.3.2, 2.3.5, 2.3.6, 2.3.7, 2.3.8, 2.3.9, 2.5.x-dev].
I'm trying to for HTTPS using the config param to true.
Is there another way of forcing the HTTPS?
Mixed Content: The page at 'https://sivar.herokuapp.com/' was loaded over HTTPS, but requested an insecure script 'http://maps.googleapis.com/maps/api/js?key=xyz&sensor=sensor=&v=3'. This request has been blocked; the content must be served over HTTPS.
can u please fix the issue it is not working in laravel 7.0
Hi,
I have used the library in my project, but unfortunately from couple days I am unable to access following links for further integrations.
Homepage: http://biostall.com/codeigniter-google-maps-v3-api-library
Demos: http://biostall.com/demos/google-maps-v3-api-codeigniter-library
Can you please provide the demos source code, I really need some of the code snippets from there.
Thanks.
The sensor parameter is no longer required for the Maps JavaScript API. It won't prevent the Maps JavaScript API from working correctly, but we recommend that you remove the sensor parameter from the script element.
Dears,
I'm doing an app that needs Google Places API. I'm using Laravel 6.x. Does this work good with this version?
I'm needing this informations:
I have set up as the guide but got this error:
Class 'FarhanWazir\GoogleMaps\Facades\GMapsFacade' not found
However I followed everything and double-checked everything, the problem still persists.
Class 'FarhanWazir\GoogleMaps\Facades\GMapsFacade' not found
namespace FarhanWazir\GoogleMaps\Facade;
I solved change in ( GMapsFacade.php ) to :
namespace FarhanWazir\GoogleMaps\Facades;
Hi Farhan Wazir, this package works fine, I love it, thanks a lot.
I have one problem to isMarkerInsideGeofence in laravel, my code is
$polygon = array('25.774,-80.190', '18.466,-66.118', '32.321,-64.757', '25.774,-80.190'); $latlngs = array('-12.043333,-77.028333', '-12.043333,-77.028333'); $mapStatus = GMaps::isMarkerInsideGeofence($polygon, $latlngs);
and Laravel response is
private function pointStringToCoordinates($pointString) { if(strpos($pointString, ", ") !== false) $coordinates = explode(", ", $pointString); elseif(strpos($pointString, ",") !== false) $coordinates = explode(", ", $pointString); else $coordinates = explode(" ", $pointString); return array("x" => $coordinates[0], "y" => $coordinates[1]); }
"Undefined offset: 1"
Do you have any ideas?
How can I make this maps responsive (Do I have to do it manually or I can use any other responsive maps templates) and how can I get current location of the user.
Hello, before find this i doe using js:
`<script>
var x = document.getElementById("demo");
function getLocation() {
if (navigator.geolocation) {
navigator.geolocation.watchPosition(showPosition);
} else {
x.innerHTML = "Geolocation is not supported by this browser.";}
}
function showPosition(position) {
x.innerHTML="Latitude: " + position.coords.latitude +
"
Longitude: " + position.coords.longitude;
}
</script>`
How i can doe with this componet.
My app is basic a project school...
I store the cordinates of any Hospital register in the DB. so i need just to get the actual lan, and long of the device, to doe a direction.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.