Support the ongoing development of Laravel.io →
posted 10 years ago
Views
Last updated 2 years ago.
0

It's going to be difficult to assist unless you show us your view code. Use the pastebin (link in the navbar) if necessary.

Last updated 2 years ago.
0

What Andrew said. In general, yes, it's 100% possible to embed map in a Laravel view (no problems with Blade or anything).

Last updated 2 years ago.
0

this is my view code http://laravel.io/bin/mW6V

Last updated 2 years ago.
0

This line...

map = new google.maps.Map(document.getElementById('map-canvas'),

Means it is going to put the map into an element with an ID of "map-canvas", you don't appear to have an element (i.e. a DIV in your page with this ID, so the map has nowhere to go.

See https://developers.google.com/maps/documentation/javascript/tu...

Last updated 2 years ago.
0

yes, I know that but my problem is like that

http://forumsarchive.laravel.io/viewtopic.php?id=16247

This problem have any solution ?

Last updated 2 years ago.
0

So, have you created a DIV with an ID of map-canvas? Have you set a height and width on it?

Last updated 2 years ago.
0

yes, set


#<style>
#map-canvas {
height: 50%;
margin: 0px;
padding: 0px
}
</style>

this is what I'm doing and not work.

http://laravel.io/bin/x0oK

I'm doing wrong?

this is the example I want to do but I need to use blade

https://developers.google.com/maps/documentation/javascript/ex...

Last updated 2 years ago.
0

Your code works fine for me, provided I give the the map-canvas div a real height. You're using a % height, which will only have any meaning if the parent div has a non-zero height.

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

montes2012 montes2012 Joined 11 Feb 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.