Cameo 11 provides a new form type: map. As the name suggests, this displays a map where the form is embedded. This provides some additional possibilities for venue map links.

Background

A venue map is provided by nominating a named area. You create named areas in search more → map search. When the map link is presented (in the booking form, event listings and emails), Cameo works out the latitude and longitude from the named area and plugs it into a URL (formerly in organisation settings → organisation details but now moved to admin → system preferences). That URL opens a map (usually OpenStreetMap or Google Maps) with a marker at the location provided in the URL. Until now, it has only been possible to show a single pin, at the centre of the named area’s bounding box.

Third-party maps take people away from your site. Also, they only work with a single marker. The new map form provides a map embedded in your own site. It dovetails with venue map links. It can also be used more generally, to display any area, or multiple areas, you may make.

Map form

Create a map form like any other form, with new form in forms → form editor (Fig 1). You’ll see just the map, with no markers. The form occupies the full width of its container and all the available height.

As well as the usual header, footer and general text, the form has options () to:

  • choose the base map style (all based on OpenStreetMap: though Google Maps works technically too, its terms of service don’t allow this way of using it).
  • when a named area is a line or area, choose whether to display the centre point as a marker instead, or to actually show a line or area.
  • whether to display the name of the area next to the marker (you can customise the label appearance using CSS if necessary).
Fig 1: map form

To overlay a named area, use a query parameter place to provide the names of one or more named areas. In the form editor, you can simulate this with the control provided; you can just amend the URL manually in form preview. Separate multiple names with vertical bars.

For example, say you have named areas One and Two, and that your web page embedding the map is https://www.mysite.com/mymap/. Then you can overlay both areas with this URL:

https://www.mysite.com/mymap/?place=One|Two

The map displays the name of the area as well as a pin (depending on the form options you select).

You can test the query parameter in the form editor with a named area using simulate query above the form.

Venue map links

The menu in the venue editor (events & bookings → venues and resources) which identifies the area now lets you choose more than one. This area is shown on your map.

Select a map form from the new, adjacent menu to display it on that map form. When you don’t select a form here, we’ll continue to use the earlier method of dropping a pin marker on a third-party map (but just for the first area if you select more than one).

Note that the URL used for a third-party map has moved from organisation settings to admin → system preferences.

Fig 2: for a venue, select named area(s) to display and form to display them on

Public named areas

When you display a named area on the map form, other than for a venue, you must make the area public. Tick the box for this in search more → map search below where you name the area.

This is needed to avoid leaking information from Cameo. Without it, someone could just edit a URL to see any named area, not just those you intended.

Fig 3: box to make named area public