wiki:BluePrint/GIS/ConfigViewportUsingMap

Viewport Map Configuration

We want a button which can be embedded within a form to be able to select the appropriate latitude/longitude for center/zoom on a shared configuration, without the user having to enter values manually.

Description


Provide an easier, more intuitive way for users to select center/zoom longitudes and latitudes. Currently, in order to set the center or zoom configurations, the latitude and longitude values must be entered manually.

It is possible with personal configurations to use the map to set center or zoom values, but this feature is not available for shared configurations.

Users would like an easier way of:

  • setting shared configurations for center and zoom
  • saving shared configurations for center and zoom

A potential additional or future enhance would be to save configurations in real-time instead of requiring a ‘Save’ button (something similar Google Docs auto-save).

Requirements


Desirable: It would be ideal if when a user wanted to create or edit a configuration they could use a map to set the values.

Constraints

  • The feature should be easy to use; the user should not need training or complicated instructions to use the new feature.
  • The solution should consider poor access to tech support and poor internet connectivity (it should not require a super fast internet connection to function properly).
  • Implementation should be similar to that of the Location Selector Widget (https://github.com/flavour/eden/blob/master/modules/s3/s3widgets.py)
  • If auto-save is used, it should not noticeably slow down the system/software; for users who prefer to save manually there should also be a ‘Save’ button that can be used in between auto-saves.

Use Cases


Scenario 1: Center Config Created for Shared Config

Problem:

  • A user wants to configure new center values for a shared configuration but is not sure what the exact coordinates are for the latitude and longitude fields.

It is not always possible to guess the correct coordinates for a location and resources for finding them are not always available. It would require more time and effort on the user’s part to have to figure out the coordinates and then enter them into the form. Now, a user can use a map to find the desired center configurations and either manually save the changes or allow the software to save it for them.

Solution:

  • A map is displayed when a user attempts to create a center configuration. On this map, the user can select the coordinates to enter in the respective fields of the configuration form.
    • As the configurations are selected on the map, the system should auto-save the configurations (and have the option for the user to save for herself)

Implementation Notes:

  • An existing implementation is available in S3LocationSelectorWidget that can be applied to this situation and used a starting point for getting the map to come up on the configuration page.
  • The javascript for this part of the project will be particularly useful has it also has a ‘Save’ button.
  • If auto-save is to be utilized, some outside spikework will need to be done on the feasibility and how we would implement this feature.
  • It is possible to add the ‘Save’ capability to the form using a Python Widget however it may be more useful/make more sense to inject it into the new view using s3.scripts.append()
  • The main map is rendered in gis index(); this can be utilized to render a map on the create configuration page.
  • When the form is rendered, we have inserted a new button in the config() method of the gis controller that the user can click to bring up the map. This is similar functionality to other buttons that bring up the map.

Scenario 2: Zoom Config Created for Shared Config

Problem:

  • A user wants to configure new zoom values for a shared configuration but is not sure what the exact coordinates are for the latitude and longitude fields.

It is not always possible to guess the correct coordinates for a location and resources for finding them are not always available. It would require more time and effort on the user’s part to have to figure out the coordinates and then enter them into the form. Now, a user can use a map to find the desired center configurations and either manually save the changes or allow the software to save it for them.

Solution:

  • A map is displayed when a user attempts to create a zoom configuration. On this map, the user can select the coordinates to enter in the respective fields of the configuration form.
    • As the configurations are chosen on the map, the system should auto-save the configurations (and have the option for the user to save for herself)

Implementation Notes:

  • The field for zoom will be populated automatically when the map is brought up for setting the center coordinates.
    • The map definition code was partially reused from another widget; based on the functionality we were able to understand and the other maps that configure zoom we were able to create a button that simulates similar functionality.
Last modified 9 years ago Last modified on 10/25/12 00:55:12
Note: See TracWiki for help on using the wiki.