Versions¶
Versions are the best way to split maps up into different themes, with different layers, permissions and functionality.
The Versions
table contains all the basic information about a version of GIFramework Maps.
Relevant tables¶
Table Name | Description |
---|---|
Versions | Contains the basic details about a version, including name, slug, start bound, theme and more |
VersionAnalytic | Identifies which analytics providers are enabled for a version |
VersionBasemaps | Contains details of the basemaps that a version has available and their default options |
VersionCategory | Contains a list of layer categories that a version has |
VersionContact | Lists the users that should be contacted regarding a version |
VersionLayer | Contains per-layer customisations applied to a version |
VersionPrintConfiguration | Identifies which print configuration a version uses |
VersionProjections | Lists the projections available to a version and what the defaults are |
VersionSearchDefinition | Lists the search definitions that are enabled in a version and their default settings |
VersionUser | Contains the users that have access to a version |
Versions¶
Name
- The name of the version. This also appears to the user in the top leftDescription
- A friendly description of the version. This also appears in the HTML meta description which is shown to search enginesSlug
- TheSlug
is the bit on the end of the URL. You can have up to 3 parts to a slug, seperated by slashes. See slugs for more infoEnabled
- A boolean indicating whether this version is enabled or not. Disabled versions will show a specific 'Disabled' message, rather than the standard 'Not found'RequireLogin
- A boolean indicating whether this version requires the user to login or not. Permissions need to be given to users using theVersionUser
table.RedirectionURL
- An optional URL to redirect the user to instead of loading the version. Can be useful if a version changes slug, or you want to point people elsewhere. Will issue aHTTP 302 Found
response with the URL providedBoundId
- TheId
of aBound
to use as the start extent for this versionThemeId
- TheId
of theTheme
to use in this versionHelpURL
- An optional URL to help documentation. A link will be put in the header of GIFramework Maps and in various other places if this URL is filled in. If left blank, no help link will be generated.WelcomeMessageId
- TheId
of theWelcomeMessage
to use in this version. Leave blank for no welcome message.FeedbackURL
- An optional URL to a feedback form. A link will be put in the header of GIFramework Maps if this URL is filled in. If left blank, no feedback link will be generated.TourDetailsId
- TheId
of aTourDetails
to use in this version. Leave blank for no tour.ShowLogin
- A boolean indicating whether to show a login button on the version. If a user is already logged in, the account box will still always show, regardless of this settingVersionNotes
- An optional text area to record any notes about the version. These are only seen by admin and cannot be seen by users.FeaturedVersion
- A boolean indicating whether to show a version in the 'Featured versions' area on the versions home page. Leaving this unchecked will put the version with 'All versions' underneath.VersionImageURL
- An optional URL to an image that will show on a version's card on the version home page. If a URL is not supplied, a default image of the world will be used. We recommend image sizes of 400px by 200px for a neat and consistent look.Hidden
- A boolean indicating whether to hide a version from the versions home page (this will not delete a version or stop it being accessed directly by its URL).
VersionAnalytic¶
The VersionAnalytic
table defines which analytics providers are available in which versions.
Slugs are the bit on the end of your application URL which direct you to different versions of GIFramework Maps. You can have a maximum of three slugs seperated by forward slashes.
By default, there should be one called 'general' which is where you will be directed if you have no slug on your URL.
Reserved slugs
There are a number of slugs that are reserved for use by the GIFramework Maps application. Using these will not work and may cause other unintended consequences.
general
account
api
print
search
broadcasthub
css
img
lib
You should not use these as the first part of the slug, regardless of any additional parts you put on the end, e.g. lib/myversion
is not valid
Examples
'general' -> Root of application e.g. https://<your-application-root>/
'highways' -> https://<your-application-root>/highways
'very/long/slug' -> https://<your-application-root>/very/long/slug
VersionBasemaps¶
The VersionBasemap
table defines which basemaps are available in which versions.
VersionId
- TheId
from theVersions
tableBasemapId
- TheId
from theBasemap
tableIsDefault
- Boolean indicating whether this basemap is the default one for that versionDefaultOpacity
- The default opacity (or transparency) of the basemap between 0 (invisible) and 100 (opaque). Leave blank for default of 100DefaultSaturation
- The default saturation of the basemap between 0 (greyscale) and 100 (full colour). Leave blank for default of 100SortOrder
- The position the basemap will appear in the basemaps panel
VersionCategory¶
The VersionCategory
table defines which categories are available in which versions.
VersionId
- TheId
from theVersions
tableCategoryId
- TheId
from theCategory
table
Bug
If you want this category to appear in many versions, but in different orders, you will need to make different categories, as the ordering cannot be set by version
Info
If your category is a child, both the parent AND child categories need to be added to this table.
VersionContact¶
The VersionContact
table defines which users should be contacted about a version.
VersionContactId
- Unique ID for this entryVersionId
- TheId
from theVersions
tableUserId
- The users unique identifier provided by the identity providerDisplayName
- The users display nameEnabled
- Whether they should be included in the email drafting list
VersionLayer¶
The VersionLayer
table contains any per-layer customisations that have been applied to this version.
VersionId
- TheId
from theVersions
tableLayerId
- TheId
from theLayer
tableCategoryId
- TheId
from theCategory
tableIsDefault
- Whether this layer is turned on by default or notDefaultOpacity
- The default opacity of the layerDefaultSaturation
- The default saturation of the layerSortOrder
- The position this layer appears within its categoryMaxZoom
- The maximum viewable zoom level of the layerMinZoom
- The minimum viewable zoom level of the layerId
- Unique autogenerated ID for this customisation
VersionPrintConfiguration¶
The VersionPrintConfiguration
table defines which print configurations are used in which versions.
VersionId
- TheId
from theVersions
tablePrintConfigurationId
- TheId
from thePrintConfigurations
table
Note
If a specific configuration is not set for a version, it will fall back to that defined for the 'general' version
VersionProjection¶
The VersionProjection
table defines which projection the map renders in and what projections are available for viewing.
VersionId
- TheId
from theVersions
tableProjectionId
- TheId
from theProjections
tableIsDefaultMapProjection
- Whether this projection is the one used for map renderingIsDefaultViewProjection
- Whether this projection is the default one set as the display coordinates
VersionSearchDefinition¶
The VersionSearchDefinition
table defines which searches are available in which versions.
VersionId
- TheId
from theVersions
tableSearchDefinitionId
- TheId
from theSearchDefinition
tableEnabled
- A boolean indicating whether this search is enabled by default (users can override this in the search options dialog)Order
- The order in which the search results are searched. Particularly important if theStopIfFound
boolean is usedStopIfFound
- Determines whether the further searches are conducted if a result has been found with this search
Example
When you do a search, GIFramework Maps starts from the top of the list (sorted by the Order
column) and works its way down until it finds a result. When it does, if the StopIfFound
boolean is set to true, GIFramework Maps will not continue with any of the other searches. This prevents users from getting lots of potentially irrelevant results when a more relevant result has already been found.
Note
If a specific search definition configuration is not found for a version, it will fall back to using search definitions defined for the 'general' version
VersionUser¶
The VersionUser
table defines which individual users are allowed to access which versions. This only applies to versions with RequireLogin
set to true.
To give a user acess to a version, simply provide their user identifier and the ID from the Versions
table.
Hint
You can get a user's identifier (or your own) by getting them to go to https://<your-application-root>/account/diagnostics
and looking up the nameidentifier
value.