Welcome to the OpenCities help centre. Search for what you're after, or browse the categories.
Can't find what you're looking for? Submit a support ticket and we'll be in touch.

Follow

Create or Update a Map

avatar of OpenCities Product Team

OpenCities Product Team

Last updated

This task is for users with the OC Map Manager role.

Before you start creating or updating maps, make sure that your site is connected with Google Maps.

To start creating maps:

  1. From the main menu, go to More > Maps.
  2. Select Create map to start creating a new map, or
  3. Select a map from the list to start editing it

You can edit map information in three tabs: the Overview tab, the Layers tab, and the Settings tab. Once your map has been created, you can add it to any page with a WYSIWYG Editor.

See How It's Done

Overview Tab

The Overview tab is used to fill in the basic details and structure of the map. Here are the fields you can edit:

Field Function
Name The name of the map. This will display in the maps list when editing a map and when inserting a map into a WYSIWYG Editor.
Description A brief description of the map for internal purposes.
Center of map

Provide the latitude and longitude of a location for the center of your map.

To find the latitude and longitude of a location in Google Maps, right-click on the map on that location and select "What's here?" from the menu. Copy the coordinates that appear on the card. The coordinates provided by selecting "What's here?" will more accurately represent the map point than the first set of coordinates in the right-click menu.

Zoom level This determines how zoomed in the map is. Use the labels as a guide to get an idea of what your map will look like.
Auto-fit to layers

Check this box to make the map automatically zoom out to the furthest point of its layers.

Note: if you have many layers covering a wide area, we recommend not selecting this option. If your map has a wide area set to auto-fit to layers, it will be extremely zoomed out upon loading.

Map aspect ratio

Use this setting to change the shape of your map on a page:

  • 1:1 creates a large, square map
  • 4:3 creates a large, rectangular map
  • 16:9 creates a rectangular map that is much shorter than it is wide
Location marker

Set what kind of marker to use to indicate the user's location on the map. You have two options:

  • Upload marker: Use the Upload marker button if you have a custom icon file. If you have a custom icon, make sure it's no smaller than 22 x 22 px and no larger than 72 x 72 px. Additionally, you can only upload these file types: JPG, JPEG, and PNG.
  • Build marker: Use this option to build a marker using our preset options. We have a drop marker or square marker you can choose from. You can choose the color and size of the marker as well.

Your marker will preview next to the selection options. 

Once you've finished editing the Overview tab, select Save to open the Layers and Settings tabs.

the overview tab on maps

Layers Tab

The Layers tab is used to create or place layers so you can determine the points of interest for this map and create a legend. The Layers tab will list any layers that are already in place, and you can create new layers or add already created shared layers.

Layers tell your map what content to display, so you must create or add at least one layer to display correctly.

You can also add shared layers from the Layers tab by selecting Add shared layer and choosing the shared layer from the list. Shared layers are created separately from individual maps and can be used on any map. They are a good way of creating a repository of map layers, so you don't have to recreate similar layers for each map.

If you're creating a layer just for this map, you can build it based on pages on your site or import an external layer, such as a KML file from Google Earth or another GIS platform.

the layers tab on maps

Based on Your Pages

Building a layer based on your pages allows you to create maps specific to your content types or labels.

You can only create layers based on pages with a location field, such as OC Events or OC Venues.

Here are the fields you can edit:

Field Function
Layer based on your pages
Name The name of the layer.
Description A brief description of the layer for internal purposes.
Content types to include

Select which content types to include on this layer:

All: Show a map pin for all content types that have built-in location fields

Some: Choose which content types to display on the map. You can only select from content types that have a built-in location field.

Labels to include

Select which content labels to filter the pages on this layer:

All: The layer will source pages with any content label from pages of a content type that has built-in location fields

Some: The layer will source pages with the labels you specify for a content type with built-in location fields. Check the box for Each page must have all labels to only include pages that have all the labels you've chosen. 

Include content from these sites Select which sites you want to source pages from.
Display features
Legend label A label used to help filter information on the map. If left blank, the system will use the layer's name in the legend.
Marker

Set what kind of marker to use for this layer. You have two options:

    • Upload marker: Use the Upload marker button if you have a custom icon file. If you have a custom icon, make sure it's no smaller than 22 x 22 px and no larger than 72 x 72 px. Additionally, you can only upload these file types: JPG, JPEG, and PNG.
  • Build marker: use this option to build a marker using our preset options. We have a drop marker or square marker you can choose from. You can choose the color and size of the marker as well.

Your marker will preview next to the selection options.

Once you've finished editing the layer, select Add to map and Save.

the build a layer based on content types options

Import Layer (KML or KMZ)

You can use KML or KMZ files to upload external layers. Here are the fields you can edit:

Field Function
Layer based on .kml or .kmz
Name The name of the layer
Description A brief description of the layer for internal purposes
Kml file

Select the KML or KMZ file you want to use. Either enter the URL link into the Enter URL field or use the Upload button to upload the file from your computer.

Display features
Legend label

A label used to help filter information on the map. If left blank, the system will use the layer's name in the legend. This label will only apply to the legend, it will not affect any markers in the KML file.

Marker

Set what kind of marker to use for this layer. You have two options:

  • Upload marker: use the Upload marker button if you have a custom icon file. If you have a custom icon, make sure it's no smaller than 22 x 22 px and no larger than 72 x 72 px. Additionally, you can only upload these file types: JPG, JPEG, and PNG.
  • Build marker: use this option to build a marker using our presets. We have a drop marker or square marker you can choose from, and you can choose which color and size it has as well

Your marker will preview next to the selection options. 

Once you've finished editing the layer, select Add to map and then Save.

The marker for the map pin is the icon in the code of the KML file. This icon's file is stored in the mapping system from which the KML file is extracted. As the icon file is stored in the mapping system and not in the OpenCities Files library, a default blue Google Maps pin will display on the map to indicate all locations in the KML file.

If you want to customize this marker, upload the custom icon to the Files library and modify the KML file to point at the uploaded marker in OpenCities. For help with this, consult with your internal GIS team.

Then, upload an Icon to show as the marker in the map's legend by choosing Upload marker. Please use an icon no smaller than 22x22 px and no larger than 72x72 px. If you don’t have a marker to upload, choose Build marker and build your own.

the import a layer options

Your layers will be shown with the most recently created layer at the top of your layers list. This represents the order of the layers in the map legend and options, so reorder your layers list if you want to change this.

Shared layers are indicated by the (Shared) label after the layer name. Click the eye icon to make a layer invisible to users. Click and drag the arrow icon to change a layer's position.

Edit or delete a layer by clicking the gear icon.

When you’re editing a layer, you can copy it to another map by selecting the map from the drop-down and pressing Copy

Settings tab

In the Settings tab, you can finalize the map's presentation. Here are the fields you can edit:

Field Function
Show address filter

Add a search function to your map so users can search for their addresses. If you select yes, you will be given a choice of the Address source:

  • OpenCities: Only searches for addresses that have been imported into the OpenCities system. If you are using this map for the My Area module, and you have imported addresses, then select OpenCities
  • Google Places: Sources addresses from Google Maps and presents them in a predictive search list.
Show map options Add the option for users to filter bases on the layers of your map. If your map only has one layer, the filters will not be shown.
Show results list

Add a list of the points of interest which are indicated by your map layers. This is displayed alongside your map and will only show results from layers based on pages, not KML layers.

Show legend Add a legend to indicate what the map is showing.
Shows results on initial page load Automatically show layers on the map when it loads for the first time.
Show Google's points of interest Include points of interest commonly seen on Google Maps, such as landmarks or parks which are not included in your layers. 

the settings tab in maps

Once you've finished editing these settings, Save and Preview your map. If you're happy with your map, you can start adding it to pages.

Add Your Map to a Page

After you have created a map, you can add it to any page with a WYSIWYG Editor. To do this:

  1. Find the page you want to edit, and select Update if it has been published.
  2. Open the WYSIWYG Editor of the page, and place your cursor where you want to add the map.
  3. In the WYSIWYG Toolbar, select the Insert Maps icon.
    the insert maps icon in the editor's toolbar
  4. Select the map you want from the drop-down menu to insert the map. It will display as a small green widget.
  5. Select Save Content and Close to close the WYSIWYG Editor, and Save and Preview the page.
  6. Publish the page when you've finished.

Troubleshooting Tips

  • If your map isn't working, check that you've set up Google Maps APIs, then refresh the map. If you're still having problems, lodge a support ticket with us.
  • If pages are hidden from search, they will not appear on a map layer.
  • If there are no content types with location fields specified on a layer, they will not appear on the map.
  • The OC Event content type will not appear on a map if the date has passed.

What Else?

Was this article helpful?
0 out of 2 found this helpful