Google maps url placeholder
-
Hi! Would it be possible to add a placeholder for opening a google maps url?
I’m not a fan of the map integration as it tricky to set up, messing with api-keys and, breaking reponsive designs and you can’t interact with it, as for example click on it to open google maps to get directions on how to get there.
I was playing around yesterday and found google developer maps url page (https://developers.google.com/maps/documentation/urls/guide). It’s quite easy to make gmaps open a location with an url.
I also made a href link i my event page formatting that took the adress from the events place and opened gmaps in a new window. This is clickable both in on a computer or on an mobile device (opens i Gmaps app).
<a href="https://www.google.com/maps/search/?api=1&query=#_LOCATIONADDRESS+#_LOCATIONTOWN" target="_blank">#_LOCATIONADDRESS, #_LOCATIONTOWN</a>
However is this event I wanted to point to specifik coordinates and not just the address so I added a location attribut and called it from the formatting instead.
#_LATT{gmapsurl}
<a href="#_LATT{gmapsurl}" target="_blank">#_LOCATIONADDRESS, #_LOCATIONTOWN</a>
In this case I could just set a point/search Google maps and copy the url and paste it as an attribute at the event page. (https://www.google.com/maps/place/61%C2%B042’55.2%22N+17%C2%B004’59.4%22E/@61.7154108,17.0820697,18z/data=!4m5!3m4!1s0x0:0x0!8m2!3d61.715336!4d17.083166?hl=sv)
I would like to have the ability to use an if function so it checks for #_LATT{gmapsurl}, if exists use that, if not use adress from events place. I have not looked into that yet though. Do you have a suggestion?
Awesome plugin btw! Just polishing some details
The page I need help with: [log in to see the link]
- The topic ‘Google maps url placeholder’ is closed to new replies.