<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
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). <br>
<br>
There already are a couple of ways to set initial values in
GeoMoose:<br>
<br>
1. Specifying a Startup Service (<a
href="http://www.geomoose.org/howto/startup.html">http://www.geomoose.org/howto/startup.html</a>)
<br>
<pre style="overflow-x: auto; overflow-y: auto; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 14px; letter-spacing: normal; line-height: 17px; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-image: initial; background-color: rgb(248, 248, 248); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">geomoose.html?call=set_image&fid=10&
;image_id=20</pre>
2. Bookmarks (hey, where's the Bookmark doc?)<br>
<pre style="overflow-x: auto; overflow-y: auto; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 14px; letter-spacing: normal; line-height: 17px; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-image: initial; background-color: rgb(248, 248, 248); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">geomoose.html?extent=-2530013,12782588,-202
8586,13213082&on=Icebergs/all</pre>
<br>
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:<br>
<pre style="overflow-x: auto; overflow-y: auto; font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 14px; letter-spacing: normal; line-height: 17px; padding-top: 0.5em; padding-right: 0.5em; padding-bottom: 0.5em; padding-left: 0.5em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(204, 204, 204); border-right-color: rgb(204, 204, 204); border-bottom-color: rgb(204, 204, 204); border-left-color: rgb(204, 204, 204); border-image: initial; background-color: rgb(248, 248, 248); color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; ">geomoose.html?UX_call=set_combobox&imag
e_id=20</pre>
Note that I keep the id in the value tag of the combo box options:<br>
<span style="color: rgb(136, 18, 128); font-family: monospace;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: pre-wrap; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
font-size: medium; display: inline !important; float: none; "><option
</span><span class="webkit-html-attribute-name" style="font-family:
monospace; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: pre-wrap; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
font-size: medium; ">value</span><span style="color: rgb(136, 18,
128); font-family: monospace; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; font-size: medium; display: inline
!important; float: none; ">="</span><span
class="webkit-html-attribute-value" style="font-family: monospace;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: pre-wrap; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
font-size: medium; ">10</span><span style="color: rgb(136, 18,
128); font-family: monospace; font-style: normal; font-variant:
normal; font-weight: normal; letter-spacing: normal; line-height:
normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: pre-wrap; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; font-size: medium; display: inline
!important; float: none; ">"></span><br>
<br>
I'm thinking of adding some code to the end of "onLoadedMapbook" to
mimic the GeoMOOSE.startService call:<br>
<br>
<tt> var args = OpenLayers.Util.getParameters();<br>
if(args.call) {<br>
GeoMOOSE.startService(args.call, args, true);<br>
}</tt><br>
<br>
something like:<br>
<tt> var args = OpenLayers.Util.getParameters();<br>
if(args.UX_call) {<br>
eval(args.UX_call+'('+args+')');<br>
}</tt><br>
<br>
But perhaps a Service with a user input type pointing to a user
extension with a "setValue" function would work with a
startupService...<br>
<br>
Maybe I'm making this too difficult. Any advice?<br>
<br>
<pre class="moz-signature" cols="72">--
Best Regards,
Brent Fraser</pre>
</body>
</html>