[fusion-trac] #65: mgmapresourceid URL override patch
Fusion
trac_fusion at osgeo.org
Wed May 14 18:36:55 EDT 2008
#65: mgmapresourceid URL override patch
---------------------------+------------------------------------------------
Reporter: amorsell | Owner: madair
Type: enhancement | Status: new
Priority: P3 | Milestone: 1.1
Component: MapGuide | Version: 1.0.6
Severity: Trivial | Keywords:
External_id: | State: New
Browser: All | Os: All
---------------------------+------------------------------------------------
This patch is to add functionality to pass a mapguide map resource ID via
a URL parameter to Fusion and have it open that map in a given Fusion
applicationDefinition.
Edit the Fusion.Lib.ApplicationDefinition.Map class in
applicationDefinition.js from (around line 534):
this.resourceId = this.extension.ResourceId ? this.extension.ResourceId[0]
: '';
if ( !Fusion.Maps[this.type] ) {
to:
this.resourceId = this.extension.ResourceId ? this.extension.ResourceId[0]
: '';
{{{
var paramMgMapResourceId = Fusion.getQueryParam('mgmapresourceid');
if (paramMgMapResourceId.length>0) {
this.resourceId = paramMgMapResourceId;
}
}}}
if ( !Fusion.Maps[this.type] ) {
Once this patch is in place, if you pass a map resource ID at the URL,
Fusion will pick that up and use it instead of the one in the appDef file.
In my case, I actually removed the contents of my ResourceId tag in the
MapSet definition. This can be tested by making a copy of the Sheboygan
map and calling it Sheboygan_2 (make some changes to it so you can tell
the difference between it and the regular Sheboygan map). Then, enter the
following URL address into your browser:
http://YOURSERVER:8008/mapguide/fusion/templates/mapguide/slate/index.html?mgmapresourceid=Library://Samples/Sheboygan/Maps/Sheboygan_2.MapDefinition
--
Ticket URL: <http://trac.osgeo.org/fusion/ticket/65>
Fusion <http://trac.osgeo.org/fusion>
Fusion is a web-mapping application development framework for MapServer and MapGuide OS.
More information about the fusion-trac
mailing list