Opened 13 years ago
Closed 13 years ago
#387 closed enhancement (fixed)
Support center and zoom attributes of the mappanel object
Reported by: | cvillemure | Owned by: | adube |
---|---|---|---|
Priority: | major | Milestone: | 1.2.0 |
Component: | widgets | Version: | trunk |
Keywords: | bis-1.2.0 InitialZoom mappanel center | Cc: |
Description
I've tried to set center and zoom attributes of the mappanel widget in gp.xml :
<options>
<center>0,4000000</center> <zoom>2</zoom>
</options>
without success. I've also tried to add the support of the OpenLayers.LonLat in Globals.xslt with the following code :
<xsl:if test="./centerString">
objOptionscenter = new OpenLayers.LonLat(<xsl:value-of select='./centerString'/>);
</xsl:if>
But that gave me the following javascript error when using the centerString option in gp.xml :
Error: this.map.getProjectionObject() is null Source File: https://.../gp/lib/client/openlayers/OpenLayers.js Line: 2488
We need to be able to specify this option in gp.xml to avoid settings the center point of the map in the template.
Change History (5)
comment:1 by , 13 years ago
Keywords: | bis-1.2.0 added |
---|
comment:2 by , 13 years ago
Component: | documentation → widgets |
---|---|
Version: | 1.0 → trunk |
comment:3 by , 13 years ago
Owner: | set to |
---|
comment:4 by , 13 years ago
r1279 :
- new options for the MapPanel widget : centerString, extentString and zoom
- these are well documented in MapPanel.rst
- all three configs support setting this option. In both XML, you simply need to set the according MapPanel widget options. In PGSQLMapContextConfig, they become MapContext valid options.
- the samples.xslt was modified so that from now on, the center/extent is controlled this way. If not set, it uses map.zoomToMaxExtent();
Todo
The two things remaining to do are :
- support overriding these options in the workspace (will be covered in this ticket)
- develop a new widget that does the same thing as the InitialView, but without being linked to a resource (will not be covered in this ticket)
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I agree that the "initZoom" without an InitialView widget set is currently a big issue in GeoPrisma. Here's a list of solutions we'll all apply to make sure that all the possible requirements are met, regardless of the config used :
This is required for 1.2.