[Geomoose-users] Possible to have a dropdown as a tool in toolbar?

Bistrais, Bob Bob.Bistrais at maine.gov
Wed Apr 3 09:37:54 PDT 2013


That might be worth a try.

From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Wednesday, April 03, 2013 12:19 PM
To: Bistrais, Bob
Cc: geomoose-users at lists.osgeo.org
Subject: Re: [Geomoose-users] Possible to have a dropdown as a tool in toolbar?

Bob,

  In 2.something (or earlier?) I did something similar by modifying the geomoose.html to deliver a static list:

    <script type="text/javascript" src="custom/tour.js"></script>
    :
    <div id="toolbar">
        <select onChange="custom_tour(this.options[this.selectedIndex].value)" style="width: 120px">
            <option value=""> Choose a Tour </option>
            <option value="Sample1"> Sample 1 </option>
        </select>
    </div>


And I did something similar in v2.4.   I instead coded a geomoose.php to deliver most of the standard geomoose.html, but added a bit to query a database and add entries to a select object:

        <select id="GA_SelectedImage" onchange="GeoMOOSE.UX.registered_extensions.GA_ImageOps.prototype.zoomToImage(this.value);">
            <option value="">Choose Image:</option>
        :
    while ($row = pg_fetch_array($result)) {
        if (!empty($image_id) && $image_id==$row['image_id']) {
          echo '<option selected="selected" value="'.$row['image_id'] . ":" . $row['extents'] . ":" . $row['path'] . '">' . $row['imagename'] . "</option>";
        } else {
          echo '<option value="'.$row['image_id'] . ":" . $row['extents'] . ":" . $row['path'] . '">' . $row['imagename'] . "</option>";
        }
      print "\n";
    }
        :

        </select>





Best Regards,

Brent Fraser
On 4/3/2013 9:52 AM, Bistrais, Bob wrote:
Thanks Brent.  I suppose this is possible, but the problem is, I'd like this to work for, among other things, picking a town name.  I have over 900 towns/townships that I would need to code in a list that way, so I'm not sure that's very feasible.


From: Brent Fraser [mailto:bfraser at geoanalytic.com]
Sent: Wednesday, April 03, 2013 11:38 AM
To: Bistrais, Bob
Cc: geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: Re: [Geomoose-users] Possible to have a dropdown as a tool in toolbar?

Bob,

  As Jim points out, you could use a Drawer to execute your code:

<drawer title="MyList" ...
        <tool name="item1" title="item 1" type="javascript" selectable="false">
            GeoMOOSE.UX.registered_extensions.my_extension.prototype.my_script('item1');
        </tool>
        <tool name="item2" title="item 2" type="javascript" selectable="false">
            GeoMOOSE.UX.registered_extensions.my_extension.prototype.my_script('item2');
        </tool>

or set the type='service', but I'm not sure how to pass the selected tool id to the service...

And in either case, I don't think a multi-select would be possible.



Best Regards,

Brent Fraser
On 4/3/2013 9:19 AM, Bistrais, Bob wrote:
Looking for something different.
The demo uses a "drawer" to contain related tools.  I'm looking for something like an HTML pick list/combobox- select a value from it, then do something with that value.  Although I could do this as a service if need be, it would be nicer if I could have the dropdown right on the toolbar.

From: Jim Klassen [mailto:klassen.js at gmail.com]
Sent: Wednesday, April 03, 2013 11:16 AM
To: Bistrais, Bob
Cc: geomoose-users at lists.osgeo.org<mailto:geomoose-users at lists.osgeo.org>
Subject: Re: [Geomoose-users] Possible to have a dropdown as a tool in toolbar?

Doesn't the demo do this with "Layer Tools"?  Or are you looking for something different?

On Apr 3, 2013, at 10:00 AM, Bistrais, Bob wrote:




Is it possible to have a dropdown list as a tool in the GeoMoose toolbar (version 2.6.x)?  If so, does anyone have a sample of how to set that up?
_______________________________________________
Geomoose-users mailing list
Geomoose-users at lists.osgeo.org<mailto:Geomoose-users at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/geomoose-users






_______________________________________________

Geomoose-users mailing list

Geomoose-users at lists.osgeo.org<mailto:Geomoose-users at lists.osgeo.org>

http://lists.osgeo.org/mailman/listinfo/geomoose-users


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20130403/347309d7/attachment.html>


More information about the Geomoose-users mailing list