[Geomoose-users] Reference map: Size and scale settings

CoFIS Web coffee at uni-bonn.de
Mon Aug 31 10:20:26 EDT 2009


Len,
thanks. It works.

Nils

Len Kne schrieb:
> Nils
> 
> Most likely you will need to put the script in compiled.js, but you may want to check your geomoose.html file to see what JavaScript files are being referenced.  You should not need to change other files. Try this:
> 
> 	if(CONFIGURATION.reference_map.enabled) {
> 		var referenceMapOptions = {
> 			size: {w:150, h:100}
> 		}
> 		ReferenceMap = new OpenLayers.Control.OverviewMap(referenceMapOptions);
> 		Map.addControl(ReferenceMap);
> 	}
> 
> See http://trac.openlayers.org/wiki/Control/OverviewMap for more options.
> 
> Len
> 
> -----Original Message-----
> From: CoFIS Web [mailto:coffee at uni-bonn.de] 
> Sent: Tuesday, August 25, 2009 10:06 AM
> To: Len Kne
> Cc: GeoMoose Mailing list
> Subject: Re: [Geomoose-users] Reference map: Size and scale settings
> 
> Len,
> I am not that familiar with JavaScript (but willing to learn). Three 
> questions I got so far:
> - Into which file would I put that - into htdocs/compiled.js?
> - How would I have to add the option (see below)?
> - are there any other files I would have to change?
> 
> In htdocs/compiled.js would it be something like this (tried with no 
> success)?
> ...
> ...
> 	if(CONFIGURATION.reference_map.enabled) {
> 		ReferenceMap = new OpenLayers.Control.OverviewMap();
> 		Map.addControl(ReferenceMap);
> 		
> 	var referenceMapOptions = {
> 		size: {w:150, h:100}
> 		}
> 	}
> 
> ...
> 
> Thanks,
> Nils
> 
> Len Kne schrieb:
>> The following javascript works to change the size of the reference map.
>>
>> 	var referenceMapOptions = {
>> 		size: {w:150, h:100}
>> 	}
>>
>> And then look for where ReferenceMap is created and have it use the options you defined.
>>
>> 	ReferenceMap = new OpenLayers.Control.OverviewMap(referenceMapOptions);
>>
>> I think you can define the other options you mentioned as well, check the OpenLayers documentation.
>>
>> Len
>>
>> -----Original Message-----
>> From: CoFIS Web [mailto:coffee at uni-bonn.de] 
>> Sent: Wednesday, August 19, 2009 11:29 AM
>> To: GeoMoose Mailing list
>> Subject: [Geomoose-users] Reference map: Size and scale settings
>>
>> Dear all,
>> which files do I have to work with for modifying the reference map's
>> - size (x,y)
>> - outline color and line with
>> - scale in relation to GM's main map window.
>>
>> In GM 1.6 it was the configuration.js, but I had no luck in crawling 
>> through htdocs/compiled.js and htdocs/geomoose/*.
>>
>> Actually, it would be nice if I was able to define the parameters in the 
>> mapbook.
>>
>> Thanks,
>> 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




More information about the Geomoose-users mailing list