andmcgregor / dashing-map

Map widget for the Dashing.js framework
22 stars 19 forks source link

Fresh install on OSX does not show map #5

Open Tekkemans opened 8 years ago

Tekkemans commented 8 years ago

Ive just installed smashing dashboard on OSX Sierra 10.12.1, with Ruby 2.3.1p112, gem 2.5.1, bundler 1.13.6. When I followed the steps to install dashing-map I dont see a Map. Ive tried it in Chrome, Safari and Firefox.

Steps I took:

When I use the dashing-map-example, I also get problems. I saw the half of the map and this had to do with the positioning of the html-elements of the generated google map (relative/absolute). So maybe this is also the case in my fresh install, but there nothing is visible at start.

Ive tried experimenting with the Browser Inspector, to toggle with the CSS position elements and I got a good result in the dashing-map-example. In the fresh install, I cant manage to get the map visible by enabling/disabling positiong of the div's that are created by the google maps api.

Does someone managed to get this plugin to work with Smashing?

Ive now got a map working by using google maps api: https://developers.google.com/maps/documentation/javascript/adding-a-google-map

flavienlaurent commented 7 years ago

Same issue here, it seems to be related to Gridster.

@andmcgregor any chance you could fix this? :)

Thanks

felixSchober commented 7 years ago

Did you two have any success?

acflint commented 6 years ago

It's not a proper solution, but the best I could come up with on the spot is adding this just below where @markers is defined on line 156 of map.coffee.

$height = $('.widget-map').parent().height();
$width = $('.widget-map').parent().width();
$('.widget-map').css("height", $height).css("width", $width)

The widget isn't displaying because the height and width aren't defined, so this just sets it to match its parent element's size.

If I come up with a real solution, I'll submit a pull request.