[Geomoose-users] Setting initial conditions
Brent Fraser
bfraser at geoanalytic.com
Tue Apr 17 17:39:00 EDT 2012
Looks like I have a need to set an initial condition for my GeoMoose
v2.4 site based on URL request values (these URLs are presented in a
Django-generated page from a database query).
There already are a couple of ways to set initial values in GeoMoose:
1. Specifying a Startup Service
(http://www.geomoose.org/howto/startup.html)
geomoose.html?call=set_image&fid=10&image_id=20
2. Bookmarks (hey, where's the Bookmark doc?)
geomoose.html?extent=-2530013,12782588,-2028586,13213082&on=Icebergs/all
But instead of the above scenarios, I want to call a JavaScript function
(in my user extension) to programmatically select an item in the ZoomTo
combo box, something like:
geomoose.html?UX_call=set_combobox&image_id=20
Note that I keep the id in the value tag of the combo box options:
<option value="10">
I'm thinking of adding some code to the end of "onLoadedMapbook" to
mimic the GeoMOOSE.startService call:
var args = OpenLayers.Util.getParameters();
if(args.call) {
GeoMOOSE.startService(args.call, args, true);
}
something like:
var args = OpenLayers.Util.getParameters();
if(args.UX_call) {
eval(args.UX_call+'('+args+')');
}
But perhaps a Service with a user input type pointing to a user
extension with a "setValue" function would work with a startupService...
Maybe I'm making this too difficult. Any advice?
--
Best Regards,
Brent Fraser
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20120417/f9e9fddd/attachment.html
More information about the Geomoose-users
mailing list