You can add the URL address of a Google Map to the Maps section. Location Service uses the address to embed the map in the page displayed to the user. Unlike in other maps, you cannot freely select areas in a Google Map: the map is displayed in the exact same way as in the Google Maps service.
It is very easy to use Google Maps material in Location Service. You only need to add a link to the map, based on which Location Service embeds the map in the page displayed to the user. The map you add may be stored in Google Maps, but it is also possible to display a location on an unstored map.
Adding a Google Map to Location Service
Perform the following steps to add a map.
- Log into the maintenance interface of Location Service.
- Select Images and maps in the main menu.
- Click Add in the Maps section.
- Enter an optional description of the map in the Description field.
- In the URL field, copy the URL address of the map stored in Google Maps.
- Click Save.
NB! When using a Google Map, the Drawing Color and Opacity settings are not taken into account. In other words, they have no impact on the map’s layout.
The added map is immediately visible in the Maps menu on the page for adding and editing libraries, collections and shelves, and can be added to the required locations. Contrary to other maps, you cannot freely select areas on a Google Map: the map is displayed in the exact same way as in the Google Maps service.
Map layout in Location Service
The settings that affect the map layout, such as size, are defined using CSS style sheets. The map is embedded into the page created by Location Service in an iframe tag, whose class attribute is set to “google_map”. The settings that affect the map layout can be defined on the basis of this information in the CSS style sheet. An example of the settings is displayed below.
Copying an URL address from Google Maps
- Navigate to Google Maps.
- Find the map you wish to add to Location Service.
- Ensure that the map you'd like to embed appears in the current map display.
- Click the settings gear icon in the bottom right.
- Click Share and embed map.
- In the box that appears, make sure the Embed map tab is selected.
- Copy the contents of the text field.
- You do not need to copy the entire text field to Location Service, but only the URL address in the src attribute of the iframe tag. The following example shows the copied code in its entirety.
The following shows the part copied to Location Service.