Proposal #4: Basic MapStore Templating System - geosolutions-it/MapStore GitHub Wiki
Overview
Allow header and footer dynamic templates for the maps on MapStore.
Proposed By
Tobia di Pisa (tdipisa) Alessio Fabiani (afabiani) Alejandro Díaz (alediator)
Assigned to Release
See Issue #337.
State
Choose one of: Under Discussion, In Progress, Completed, Rejected, Deferred
Motivation
The goal is to enable MapStore and MapManager to provide to the admins a way to easily design custom templates, and to the customers a method to include customised headers and footers into the maps, the shared ones also.
Proposal
The original fork with the dynamic templating implementation here.
The tasksheet with the list of the improvements to do [here] (https://docs.google.com/spreadsheet/ccc?key=0AtnuKyTvUeXcdHFySl9aZkQ4bU43d1BMNmZLNmdFQnc&usp=drive_web#gid=0)
-
GeoStore: Allow search by category
-
GeoStore: Add metadata to the search results
-
MapStore: Allow footer customization - Move the bbar inside the appTabs panel and manage language selector as a plugin.
-
MapStore: Allow to parse header and footer from the default configuration (static or remote) - Add an optional parameter to the default configuration for the header and the footer html content.
-
MapStore: Parse a new url parameter (configId) - The config id is used to retrieve the default configuration (with themplate infomations) from geostore instead than locally. _- The 2 configurations will be merged giving priority to the options contained in the map configuration _ - The map configuration doesn't mantain any template information. If the configId parameter is not present the current behaviour will be used (load static configuration using the URL config parameter or load the default config file if missing )
-
MapStore: Change the save/load maps behavior - Now map options are saved using a blacklist.use a whitelist instead (maps and gsSources options, maybe other)
-
MapManager: Mange the additional attribute/metadata containing the configId associeated to the map - For each map (mapId) we have a corresponding configId (containing template information). _Manage the creation of the URL containing both mapId and configId. _ - During map creation / editing a new tab is opened from the MapManager GUI (using the static configuration of the composer) - For the Viewer a new browser window will be opened with the configId parameter in the URL to display the map inside the template The configId is not used if the map is opened from the mapmanager, but only for guest access (for instance share links)
-
Template Manager: Create the template manager - - 1 new action to visualize a new tab in the map manager for administrator - 2 the new tab should show a grid of resurces from geostore in the TEMPLATE category - 3 the administrator can browse and edit these resources and only modify the option for the banner using the extjs WYSIWYG editor. - 4 put in the manager configuration the name of the basic configuration file to use as base to create custom templates (e.g. mapStoreConfg.js as base) - 5 Allow to upload images for banners using servicebox
Templating Workflow
Create Templates through MapManager
An admin user will be able to list the available templates, defined and stored on GeoStore, and to use an easy embedded mechanism to create new ones.
The MapManager Panel will contain another Tab panel for the Templates managements
Assign a Default Template to a map from the MapManager
Dinamically Select a Template for a map
Every Template will be store as a special Resource with a specific Category on GeoStore. As a Resource the Template will have a unique ID, which is an Integer number.
It is always possible to dinamically select the Map Template by specifing the Template ID on the Map URL Query Parameters.
Something like:
http://host:port/MapStore?${map_id}&config=${configuration_name}&configId=${template_id}
Feedback
This section should contain feedbacks provided by members who may have a problem with the proposal.
Pending issues
Backwards Compatibility
Voting
Tobia Di Pisa +1