giansi/gravstrap

Google Maps not showing.....

Closed this issue · 9 comments

I noticed that on my local install, the google maps (map) is not showing. I am using the stock template
google maps not showing2

Your webpage example it somewhat works
google maps gravstrap diblas partially works

(google maps loads partially, but no roads).

But in my gravstrap admin install and gravstrap skeleton, the map is grey without loading anything (see first image).

Again, one more example from your own gravstrap homepage: google maps only partially loads.
gravstrap diblas google maps partial

Some more questions: In the plugin shortcode google maps, I do not see ability to enter GPS coordinates, use google maps link, etc.
How does the shortcode know where to place marker? How far to zoom, etc? I don't see where to set the map parameters.

Hello,

you only have to do two thinks (at least for me this worked then)
Change the setting from the Google Maps Plugin:
From true to false

googlemaps:
built_in_css: false

And add the asset to your base.html.twig from the gravstrap-theme.

{% block bottom %}
    {{ assets.js('bottom') }}
{% endblock %}

Worked fine, the built-in_css makes a proper grey div and the assets.js adds the google maps!

Regarding your last question, its in the yaml part of your page.
Maybe have a look at the Docs from googlemaps plugin, he explained it

@4evermaat have you tried @Hanfrey solution? I did and still not works. It does not parse the [GOOGLEMAPS:map] anymore

I repeated the steps to test if i have something forgot.

  • composer create-project getgrav/grav grav3

  • bin/gpm install gravstrap-theme

  • copy the demo pages in the user/pages folder

  • change the theme in the system.yml and activate the markdown-extra

  • in the user/plugins/googlemaps.yml change built_in_css to false

  • in the /user/themes/gravstrap-theme/templates/partials/base.html.twig add assets in block footer

    {% block footer %}
       {{ assets.js('bottom') }}
      {{ footer }}
      </footer>
      {% endblock %}
    

and its working.

Grav (v1.0.10)

Just released v1.0.3 which solves this issue.

I updated gravstrap to 1.0.3 and it still shows blue now for me instead of gray.
google maps not showing again 1 0 3

I visited http://gravstrap.diblas.net/ . The map is better (shows marker, google logo, etc, but the full google map still does not load. I visit https://www.google.com/maps/@41.897563,12.518114,11z?hl=en-US directly and the map shows just fine. It is only within gravstrap that is the problem.

Are you guys using different coordinates?
I'm using Google Chrome 49.0.2623.87 m (64 bit) and Firefox 38.x and windows 7 64 bit.


PS: could you find a way to close an issue without closing it permanently? Unless the user is supposed to open a new ticket.

Have you removed the [GRAVSTRAP:map] declaration and replaced it with the new shortcode? http://diblas.net/plugins/use-bootstrap-components-as-shortcodes-in-grav-cms/gravstrap-google-map-shortcode#upgrading

I guess you do not completely understand how github works. When I close an issue because I suppose it has been fixed, you can comment it again and if you point something still do not work, I can open the issue again. This means the user is not supposed to open a new ticket, but he should continue with the closed ticket.

This page google maps is now working. Did you update the demo pages in the theme? If you do this, I can copy the updated demo pages and work directly with them.

I'll remember to re-use old tickets for the same issue. Normally the ticket reopens when new comment is opened. But it did not so I was unsure.

Yes, I updated the demo pages. You can find them here: https://github.com/giansi/gravstrap-theme-skeleton/tree/master/pages

I can confirm after updating the demo pages, google maps works ok. but your googlemaps shortcode page example has not been updated.