Skip to content
This repository has been archived by the owner on Nov 8, 2017. It is now read-only.

the map not showing in div. #343

Open
ferbj opened this issue Sep 22, 2017 · 1 comment
Open

the map not showing in div. #343

ferbj opened this issue Sep 22, 2017 · 1 comment

Comments

@ferbj
Copy link

ferbj commented Sep 22, 2017

Hello actually i get the map so:
image
but if i resized the browser so the map showing.
or if i clicked in maximize then is showing the map
image

in my project i use bootstrap with laravel, i use in a normal div.
exist a problem with bootstrap 3.3.6? thank for the help.

@ggabrovski
Copy link

You can try to force "map resize" and center the map after geocode:result event.
For example:

$("#geocomplete").geocomplete({
  map: ".map_canvas",
  types: ["geocode", "establishment"],
  })
  .bind("geocode:result", function(event, result){
     var map = $("#geocomplete").geocomplete('map');
     google.maps.event.trigger(map, "resize");
     map.setCenter(result.geometry.location);
  })
;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants