I cannot make it show map instead longitude and lattitude informations shown. I added a block containing
<iframe width="600" height="300" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?q={{ lat }}%2C{{ lng }}&key=YOUR_API_KEY"></iframe> with my API_KEY but it only shows the map location of "Mondeca"

Comments

engin created an issue. See original summary.

engin’s picture

Issue summary: View changes
engin’s picture

Issue summary: View changes
engin’s picture

Issue summary: View changes
engin’s picture

Component: Google Maps geolocation » Geolocation field
derjochenmeyer’s picture

Status: Active » Postponed (maintainer needs more info)

How did you add the block?

Did you copy the file geolocation-formatter-geolocation-latlng.html.twig to your theme folder to add the code above?

engin’s picture

No, I now figured out thanks for your help. I was try it with the code in a block.

engin’s picture

I created the file geolocation-formatter-geolocation-latlng.html.twig and put it in a root of the active theme folder

<iframe width="600" height="300" frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?q={{ lat }}%2C{{ lng }}&key=AIzaSyBD"></iframe>

but the map doesn't show up.

derjochenmeyer’s picture

Maybe you have to rebuild the cache?

engin’s picture

I rebuilded the cache but it does'nt show

engin’s picture

It is ok with the bartik theme thanks. The new Drupal 8 themes are quite unstable at the moment. With default Bartik theme it is ok.

derjochenmeyer’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)