Comments (5)
Make sure you render to an element with a width and height.
<div style="height: 500px; width: 500px;">{!! Mapper::render () !!}</div>
from googlmapper.
Hi, it's as simple as creating a map in your controller, then rendering in you view. The below should work:
// In your controller
use Cornford\Googlmapper\Facades\MapperFacade as Mapper;
Mapper::map($workGPSLocations[0], $workGPSLocations[1]);
// In your view
{!! Mapper::render () !!}
from googlmapper.
i get the following content when using
<div>{{ \Mapper::render(0) }}</div>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v=3.exp®ion=GB&language=en-gb&key=AIzaSyAfYOov7QNu9s56k0&signed_in=false&libraries=places"></script> <script type="text/javascript" src="//googlemaps.github.io/js-marker-clusterer/src/markerclusterer.js"></script> <div id="map-canvas-0" style="height: 100%; margin: 0; padding: 0;"></div> <script type="text/javascript"> var maps = []; function initialize_0() { var bounds = new google.maps.LatLngBounds(); var infowindow = new google.maps.InfoWindow(); var position = new google.maps.LatLng(36.5677206, 139.9033588); var mapOptions_0 = { center: position, mapTypeId: google.maps.MapTypeId.ROADMAP, disableDefaultUI: false , scrollwheel: true }; var map_0 = new google.maps.Map(document.getElementById('map-canvas-0'), mapOptions_0); map_0.setTilt(90); var markers = []; var markerPosition_0 = new google.maps.LatLng(36.5677206, 139.9033588); var marker_0 = new google.maps.Marker({ position: markerPosition_0, title: '', animation: '' , icon: '' }); bounds.extend(marker_0.position); marker_0.setMap(map_0); markers.push(marker_0); var idleListener = google.maps.event.addListenerOnce(map_0, "idle", function () { map_0.setZoom(8); }); var markerClusterOptions = { imagePath: '//googlemaps.github.io/js-marker-clusterer/images/m', gridSize: 60, maxZoom: null , averageCenter: false , minimumClusterSize: 2 }; var markerCluster = new MarkerClusterer(map_0, markers, markerClusterOptions); maps.push({ key: 0, markers: markers, map: map_0 }); } google.maps.event.addDomListener(window, 'load', initialize_0); </script>
from googlmapper.
it worked ... Thank you !!
from googlmapper.
its worked ... Thank you !!
from googlmapper.
Related Issues (20)
- Map Drag Event (Livewire) HOT 3
- Can you get lat/lng of clicked location? HOT 1
- Map not rendering when parent element is hidden HOT 1
- Map disappers when changing livewire model HOT 6
- gpx HOT 1
- Display KML/KMZ HOT 3
- Error Google Maps JavaScript API error: InvalidKeyMapError HOT 2
- Cornford\Googlmapper\Exceptions\MapperInstanceException No map found to add a polyline to. HOT 3
- Add new icon by click on the map view
- Drawing Layer (Library) HOT 1
- Laravel 9 support: illuminate/support v9.0? HOT 3
- Add listener 'click' on polyline ?
- DrawingManager Displayed twice based on React-18 upgrade HOT 1
- Re-rendering google
- eventClick on marker get Zoom
- Recenter Map With Livewire HOT 3
- labelClass doesnt work
- Bad Method Call Exception - Method Illuminate\Foundation\Application::share does not exist.
- Laravel 10 HOT 4
- Laravel 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from googlmapper.