Giter VIP home page Giter VIP logo

Comments (5)

bradcornford avatar bradcornford commented on August 17, 2024 4

Make sure you render to an element with a width and height.

<div style="height: 500px; width: 500px;">{!! Mapper::render () !!}</div>

from googlmapper.

bradcornford avatar bradcornford commented on August 17, 2024

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.

lakachew avatar lakachew commented on August 17, 2024

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&region=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.

lakachew avatar lakachew commented on August 17, 2024

it worked ... Thank you !!

from googlmapper.

baqirfarooq avatar baqirfarooq commented on August 17, 2024

its worked ... Thank you !!

from googlmapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.