1Features

- Paste the map embed code a google.com/maps link, coordinates or an address; no API key needed
- Several locations e.g. the main hospital, the outpatient building, the car park
- The Directions takes the coordinates from the embed code and opens the Google Maps app with the route
- Thai / English names and addresses; adjustable height, corner radius and button colour
- Waits for cookie consent with iDev Cookie Consent (Google may set cookies when a map loads)
2Getting started
- Copy the map embed code
Open Google Maps and find the place → Share → Embed a map → Copy HTML
- Add the location
iDevApp › Maps and directions Paste the code into Google Map add the name, address and phone, then click Test the directions link to check the location

iDevApp › Maps and directions - Put the map on a page
Add the block Maps and directions or
[idev_map]to the contact page
Short links maps.app.goo.gl can’t be embedded as a map; use "Embed a map" instead (the directions button can still use a short link). If the directions button goes to the wrong place, enter coordinates in Directions destination e.g. 13.7563,100.5018
3Blocks and shortcodes
| Shortcode | Result |
|---|---|
[idev_map] | Map of location 1 with buttons |
[idev_map location="1"] | Location 2 (location counted from 0) |
[idev_map height="300" buttons="no" address="no"] | Adjust the height, hide the buttons or address |
[idev_map map="no"] | Name, address and buttons only, without loading the map |
[idev_directions label="Directions to the hospital"] | Directions button only (for the footer or the mobile bottom bar) |
PHP: idev_map_render(['location' => 0]) · idev_maps_directions_url(0) returns the directions link