[Geomoose-users] GM2: Where to put customized JS-code to survive revision upgrades

Nils Zierath | Center for Development Research Bonn (ZEF) nils.zierath at uni-bonn.de
Mon Aug 31 11:10:04 EDT 2009


Dan,
thanks to help from Len I modified htdocs/compiled.js and my mapbook as 
put in the attached textfile.

The result works great so far: http://www.cofis.info/atlas_beta

Cheers,
Nils

Dan Little schrieb:
> Well, I'd be interested in the patches to see what is applicable to roll into trunk. :-)
> 
> Right now, there is not a lot of architecture for doing this.  Really, compiled.js shouldn't get modified.  The actual source script in htdocs/geomoose should be edited and compiled.js should be rebuilt using compileGeomoose.py in the tools directory.
> 
> I was in the process of writing a development guide on this and then realized that I really need to code an user-extensions architecture. :-|
> 
> 
> ----- Original Message ----
>> From: CoFIS Web <coffee at uni-bonn.de>
>> To: GeoMoose Mailing list <geomoose-users at lists.sourceforge.net>; "geomoose-developers at lists.sourceforge.net" <geomoose-developers at lists.sourceforge.net>
>> Sent: Monday, August 31, 2009 9:35:26 AM
>> Subject: [Geomoose-users] GM2: Where to put customized JS-code to survive revision upgrades
>>
>> Dear all,
>> is there an easy way to maintain custom changes to JavaScript code, 
>> across revision upgrades?
>>
>> I did change a few lines in htdocs/compiled.js to modify my reference map.
>> - How would I put that into a seperate script so that the changes 
>> override the defaults in htdocs/compiled.js?
>> - Would I have to modify any files exept for geomoose.html to include 
>> the new js-file?
>>
>>
>> Thank you,
>> Nils
>>
>> -- 
>> Center for Development Research
>> Department of Ecology and Resource Management
>>
>> Walter-Flex-Strasse 3
>> 53113 Bonn (Germany)
>>
>> Tel.:   +49 (0) 228 - 73-1793
>> FAX:    +49 (0) 228 - 73-1889
>>
>> E-Mail: coffee at uni-bonn.de
>>
>> Web:    http://www.cofis.info/atlas
>>          http://www.coffee.uni-bonn.de
>>
>> ------------------------------------------------------------------------------
>> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
>> trial. Simplify your report design, integration and deployment - and focus on 
>> what you do best, core application coding. Discover what's new with 
>> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> _______________________________________________
>> Geomoose-users mailing list
>> Geomoose-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geomoose-users
> 
> 
> 
>       

-- 
Nils Zierath

Center for Development Research
Department of Ecology and Resource Management

Walter-Flex-Strasse 3
53113 Bonn (Germany)

Tel.:   +49 (0) 228 - 73-1793
FAX:    +49 (0) 228 - 73-1889

E-Mail: nils.zierath at uni-bonn.de
Web:    http://www.coffee.uni-bonn.de
         http://www.zef.de
-------------- next part --------------
/*	Replacement for original RefMap in compiled.js	*/

	if(CONFIGURATION.reference_map.enabled) {
		var referenceMapOptions = {
			size: {
				w:	CONFIGURATION.reference_map.width,
				h:	CONFIGURATION.reference_map.height
			},
			minRatio:	CONFIGURATION.reference_map.minimum_ratio,
			maxRatio:	CONFIGURATION.reference_map.maximum_ratio
		}
		ReferenceMap = new OpenLayers.Control.OverviewMap(referenceMapOptions);
		Map.addControl(ReferenceMap);
	}


/*	Additions to Mapbook	*/

<param name="reference_map.width">275</param>
<param name="reference_map.height">190</param>
<param name="reference_map.minimum_ratio">10</param>
<param name="reference_map.maximum_ratio">20</param>


More information about the Geomoose-users mailing list