Contents
On this page
Map - Plugixa Car Parking
Map PRO is a shortcode that turns your locations into a location finder. A list of car parks sits beside a Google map of them. Each car park shows its photo, its lowest price, whether it is open now, and buttons to book it or get directions.
Setting it up
- In the Google Cloud console, make a project with a billing account linked and the Maps JavaScript API enabled, and create an API key. Google does not draw maps for a project without billing, even inside its free monthly allowance.
- Open Plugixa Car Parking -> Settings -> Map, paste the key into Google Maps API key and click Save.
- Give each location a latitude and a longitude. See Locations.
- Put
[plugixa_car_parking_map]on a page.
For the Book now button, the site also needs a page with the booking form on it. The button opens that page with the car park already chosen.
What a visitor sees
- The list. One card per car park, with its photo (or a “P” tile when it has none), its name and address, an Open now or Closed badge, its lowest price, and Book now and Directions.
- The map. One pin per car park. A pin shows the car park’s lowest price, or a dot when it has none. Pins that would overlap are drawn as one round cluster with a count. Clicking a cluster zooms in on it.
- Search. A box above the list filters the list and the pins as the visitor types. It matches the name, the town, the postcode and the street.
- Near me. The visitor’s browser asks for their location. With permission, the list is sorted nearest first, each card shows how far away it is, and the map shows the visitor as a blue dot. Without permission nothing changes.
Hovering a card highlights its pin. Clicking a card moves the map to its car park and opens a small card above the pin. Clicking a pin highlights its card and scrolls the list to it. Esc or a click on the map closes the small card.
On a narrow page the map goes on top and the cards become a row underneath, swiped one at a time. The car park swiped to is the one shown on the map. This follows the width the theme gives the locator, not the size of the screen, so a narrow content column on a large monitor gets this layout too.
The Map settings

| Field | Default | Notes |
|---|---|---|
| Enable the map | On | Off: the shortcode shows nothing and every booking form uses its plain location list. The other settings are kept. |
| Google Maps API key | Empty | “From the Google Cloud console, with the Maps JavaScript API enabled. It is used in the visitor’s browser, so restrict it to this site’s address.” |
| Shortcode | [plugixa_car_parking_map] |
Read-only, with a copy button. |
| Choose the location on a map in the booking form | On | See In the booking form. Off: no booking form shows the map. |
| Map style | Clean and muted | Clean and muted hides shops, transit and other points of interest, so the pins stand out. Light keeps them but softens the colours. Dark is a dark map. Google standard is Google’s own look. |
| Layout | List beside the map | Map only drops the list and the search. The small card above a pin is then the only place a car park’s details are shown. |
| Pin colour | Empty (blue) | The colour of the pins, the clusters, the selected card and the Book now button. Anything that is not a hex colour such as #0a7f5c is not saved. |
The key is not treated as a secret. It is shown in the field after saving, and it is visible to anyone who views the source of a page that holds the map, because the visitor’s browser has to send it to Google. That is how Google Maps keys work. Protect it in the Google Cloud console:
- restrict it to your site’s address, for example
https://example.com/*; - restrict it to the Maps JavaScript API only, so a copied key cannot be used for Google’s other paid services.
The shortcode
[plugixa_car_parking_map]
| Attribute | Default | What it does |
|---|---|---|
height |
560 |
The height of the locator in pixels, from 240 to 1600. A number only, without px. On a narrow page it is the most the map takes. |
zoom |
13 |
The zoom level used when there is a single car park. |
layout |
The Layout setting | list or map. |
style |
The Map style setting | muted, light, dark or google. |
search |
yes |
no hides the search box and the Near me button. |
[plugixa_car_parking_map height="640" style="dark"]
[plugixa_car_parking_map layout="map" height="420"]
An attribute value that is not one of those listed is replaced by the default. Each map on a page keeps its own height, style and layout.
The shortcode has no attribute for choosing locations. Every map shows the same set.
What each car park shows
A location is listed when both of these are true:
| Condition | Detail |
|---|---|
| It is active | Inactive and trashed locations are left out. |
| It has coordinates | Both Latitude and Longitude are filled in. |
The plugin does not look up coordinates from an address. Type them on the location.
| Shown | Where it comes from |
|---|---|
| Photo | The location’s image. |
| Address | Street, town, postcode and country code, for example “1 High St, London, GB”. |
| Price | The lowest rate of the space types the location offers, in the unit the location bills by: “from $8.00 / day”, “from $1.50 / hour”. Pricing rules, coupons and taxes are not applied: it is the starting rate. A location with no rate in its unit shows no price. |
| Open now / Closed | The location’s opening hours and closures, in the location’s time zone, or the site’s when it has none. A location with no hours shows Open 24 hours. Today’s closing time or next opening time is shown beside it. |
| Book now | Opens the booking page with the location chosen (see below). Hidden when the site has no booking page. |
| Directions | Opens Google Maps with directions to the location, in a new tab. |
The Book now link
The button opens your booking page with ?pcp_location= and the location’s
slug, for example:
https://example.com/book/?pcp_location=city-centre-garage
The booking form reads this and starts on that location. It also accepts a location id. A value that is not one of the form’s locations is ignored. You can use the same link anywhere, for example in an email or a menu.
In the booking form
When a booking form offers more than one location, its first step can show them on the same map, with the list of car parks beside it. Choosing a pin or a card’s Choose button chooses that location in the form, and the customer picks the dates below it. The form’s location list is still there: it is hidden only when every location it offers is on the map, so a location without coordinates can still be chosen.
Each saved booking form has its own Location map box on its edit page, with the switch Show the map in this form. It is on unless you turn it off, and it is saved with the form’s Save button. The map shows in a form only when all three are on: Enable the map, Choose the location on a map in the booking form, and the form’s own switch. It also needs an API key.
A ?pcp_location= link still works: the form opens on that location, and the
map shows it chosen.
When nothing appears
The shortcode prints nothing visible in three cases. Each leaves a comment in the page source that says why.
| Case | Comment in the page source |
|---|---|
| The map is turned off | plugixa-car-parking map: the map is turned off in Settings |
| No API key is saved | plugixa-car-parking map: set a Google Maps API key in Settings |
| No active location has coordinates | plugixa-car-parking map: no geocoded locations |
If the key is saved but Google rejects it, the list is still drawn and Google shows its own error where the map would be. The common causes are:
- the project has no billing account;
- the Maps JavaScript API is not enabled;
- the key’s website restrictions do not include the address the page is on.
What is loaded, and when
Google’s script is loaded only on a page where the shortcode actually draws a map. Pages without the shortcode, and pages where it prints nothing, load nothing from Google.
| Loaded | From | When |
|---|---|---|
| The Google Maps JavaScript API | https://maps.googleapis.com |
In the visitor’s browser, on a page with a map |
| The plugin’s locator script and stylesheet, and the public stylesheet | Your own site | On the same page |
The visitor’s browser contacts Google directly, sending your API key and whatever a browser normally sends, such as the IP address. Your server sends nothing to Google. The location data shown is written into the page.
Near me uses the browser’s own location service. The position stays in the visitor’s browser: it is not sent to your site or to Google by the plugin.
Because the map contacts a third party from the visitor’s browser, mention it in your privacy policy, and check whether your consent tool has to hold it back until the visitor agrees. See Privacy and uninstall.
Without Pro
In the free edition [plugixa_car_parking_map] is not a registered shortcode,
so WordPress prints the tag as plain text. Remove it from your pages if you go
back to free. The saved settings are kept and are used again when Pro is
reinstalled. A ?pcp_location= link still works in the free edition. See
Free vs Pro.
Quick Links
Share