Opened 13 years ago

Closed 13 years ago

#172 closed task (fixed)

"MapPanel" and "Layer" new widgets

Reported by: adube Owned by:
Priority: major Milestone:
Component: widgets Version:
Keywords: Cc:

Description

Problem

The Map widget have several problems. It :

  • doesn't create the GeoExt.MapPanel
  • has its own 'core' widget file to manage its layers in the ACL, making it special and complex
  • doesn't support all OpenLayers.Map and OpenLayers.Layer possible options.

GeoExt has become our main framework to build map applications. Most of its widgets and ux widgets rely on the MapPanel. The fact that we need to manage it manually in the template is becoming a critical problem.

Solution

Deprecate the map widget, replacing it by two new ones : MapPanel and Layer.

  • Both would be 'generic' core widgets
  • MapPanel would be responsible of creating the OpenLayers.Map and GeoExt.MapPanel objects
  • Layer would be responsible of creating the OpenLayers.Layer objects
  • The PGSQLMapContextConfig driver would use these new widgets instead of the current Map one.
  • We'll be able to use the same Layer widget for multiple resources to use the same options to create the according layers.
  • The name of the layer will come from the resource 'title' or 'name' if the title is not defined
  • The 'servicetype' option could be optional. If not set, then create one layer per datastore each resource has.

Conclusion

This is a big change but a required one to follow the GeoExt wave.

Change History (6)

comment:1 by adube, 13 years ago

r918 , featuring :

  • new MapPanel widget with full documentation
  • new Layer widget with full documentation
  • 2 samples both showing WMS, TileCache, FeatureServer and GYMO layers.

more technical details

  • the ZoomSlider and GeoExtToolbar widgets are automatically added to the created GeoExt.MapPanel widget
  • new 'getOpenLayersObject' template in Globals.xslt

known issues

  • BING layers are not working (unknown JavaScript error)
  • Vector layers currently use the HTTP protocol instead of MapFish, so transactions by the editing widgets currently don't work.

to do and enhancements

  • PGSQLMapContextConfig driver support AND use of these new widgets instead of the Map widget.
  • change the stylemap methods to use the official OpenLayers property values (currently still in lowercase and list is manually defined)
  • have an option in the MapPanel widget to merge WMS layers that have the same service. Default behavior should be to leave them separated.
  • do more tests with more widgets

Deprecate the Map widget

As soon as these widgets are 100% complete, we should deprecate the Map widget.

comment:2 by adube, 13 years ago

r919, featuring :

  • PGSQLMapContextConfig driver support AND use of these new widgets instead of the Map widget.
  • geoexttoolbar/pgsqlconfig sample updated to use the MapPanel and Layer instead of Map as well

important changes

  • maxscaledenom and minscaledenom resource options removed. Use 'minScale' and 'maxScale' instead. You can still add a service type string at the end to allow resource option per service type.
  • layertreepath resource option replaced by group. You can still add a service type string at the end to allow resource option per service type.
  • Now, MapContext and Resource options that define OpenLayers or GeoExt properties MUST have the same name, for example : isbaselayer is no longer supported, use isBaseLayer instead.

comment:3 by adube, 13 years ago

To do (more)

The PGSQLMapContextConfig driver should still have an option to create the old Map widget instead of the MapPanel and Layer widgets for backward compatibility.

comment:4 by adube, 13 years ago

r955, featuring :

  • New PGSQLMapContextConfig driver option to use the legacy 'Map' and 'MapFishLayerTree' widgets and their according options with this config :
org_geoprisma_config_PGSQLMapContextConfig::useLegacyWidgets(true);
  • New sample that shows the use of that new option

comment:5 by adube, 13 years ago

r956, featuring :

  • useLegacyWidgets documentation

comment:6 by adube, 13 years ago

Resolution: fixed
Status: newclosed

Those two widgets are completed. The remaining things to do such as 'map' widget deprecation should be covered in other tickets.

Note: See TracTickets for help on using tickets.