[Geomoose-users] GeoMoose 3 - Select

Christopher Hughes chughes at co.lincoln.or.us
Mon Feb 3 15:41:14 PST 2020


Thanks Dan,

I got it working from that. For anyone's reference here's my full service:

        app.registerService('select-list', SelectService, {

          // set the default layers
          defaultLayer: 'Taxlots_selection-wfs/Taxlots_selection',

          fields: [{
            type: 'select',
           // specify the default layer
            default: 'Taxlots_selection-wfs/Taxlots_selection',
            // specify and label the list of layers to select
            options: [
              {value: 'Taxlots_selection-wfs/Taxlots_selection', label:
'Taxlots'},
              {value: 'surveys_selection-wfs/surveys_selection', label:
'Surveys'},
                      ],
                  }]
          });

It looks like the defaultLayer parameter may not be needed, but the default
within the fields section is.

Chris


On Sun, Feb 2, 2020 at 10:15 AM Dan Little <theduckylittle at gmail.com> wrote:

> Something like this:
>
> {
>   type: 'select',
>   options: [
>     {value: 'path/to/layer', label: 'SUPER LAYER'},
>     {value: ';path/tolayerB', label: 'LESS SUPER LAYER'},
>   ],
> }
>
>
>
> On Fri, Jan 31, 2020 at 12:27 PM Christopher Hughes <
> chughes at co.lincoln.or.us> wrote:
>
>> Hi Dan,
>>
>> How would you adjust this to specify a fixed list of layers?
>>
>> Thanks,
>>
>> Chris
>>
>> On Tue, Jan 28, 2020 at 11:18 AM Christopher Hughes <
>> chughes at co.lincoln.or.us> wrote:
>>
>>> Thanks for these fixes! I've added these and now it looks like it's
>>> working (almost) as expected.
>>>
>>> My only question is what is the 'name: 'layer'' parameter supposed to
>>> do? Adding or removing
>>> it doesn't appear to change how the service works or looks, so I'm not
>>> entirely sure I've configured
>>> it correctly. I was hoping it would add a subheader or something so that
>>> users know what dataset
>>> they're querying. (The main reason I'm trying to do this is because for
>>> some users breaking apart
>>> the select into different tools may be more straightforward than a
>>> drop-down menu).
>>>
>>> Thanks,
>>>
>>> Chris
>>>
>>> On Mon, Jan 27, 2020 at 6:17 PM Dan Little <theduckylittle at gmail.com>
>>> wrote:
>>>
>>>> I messed up two things:
>>>> 1. It should be "fields" not "inputs".
>>>> 2. We have not properly implemented hidden fields.
>>>>
>>>> Here is the fix for 1:
>>>>     app.registerService('select', SelectService, {
>>>>         // set the default layer
>>>>         defaultLayer: 'vector-parcels/parcels',
>>>>         fields: [{
>>>>             type: 'hidden',
>>>>             name: 'layer',
>>>>             default: 'vector-parcels/parcels'
>>>>         }]
>>>>     });
>>>>
>>>> And the fix for 2:
>>>> - https://github.com/geomoose/gm3/pull/461
>>>>
>>>> On Mon, Jan 27, 2020 at 5:27 PM Christopher Hughes <
>>>> chughes at co.lincoln.or.us> wrote:
>>>>
>>>>> Thanks for the feedback.
>>>>>
>>>>> I'm having trouble replicating this. I'm trying to modify the demo's
>>>>> select to test it and I'm not noticing any difference in the select tool.
>>>>>
>>>>> Demo:
>>>>>     app.registerService('select', SelectService, {
>>>>>         // set the default layer
>>>>>         defaultLayer: 'vector-parcels/parcels',
>>>>>     });
>>>>>
>>>>> My Attempt:
>>>>>     app.registerService('select', SelectService, {
>>>>>         // remove the layer select
>>>>>         inputs: [{
>>>>>             type: 'hidden',
>>>>>             name: 'Parcels',
>>>>>             default: 'vector-parcels/parcels'
>>>>>          }]
>>>>>     });
>>>>>
>>>>> The only change I'm noticing is that with this syntax, turning on
>>>>> autoGo and removing the select options incompatible with autoGo no longer
>>>>> works.
>>>>> Any suggestions?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Chris
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sun, Jan 26, 2020 at 1:24 PM Dan Little <theduckylittle at gmail.com>
>>>>> wrote:
>>>>>
>>>>>> This should be settable in app.js:
>>>>>>
>>>>>>     app.registerService('my-other-select', SelectService, {
>>>>>>         // remove the layer select
>>>>>>         inputs: [{
>>>>>>             type: 'hidden',
>>>>>>             name: 'layer',
>>>>>>             default: 'source/layer'
>>>>>>          }]
>>>>>>     });
>>>>>>
>>>>>> This change removes the Select input and makes it a fixed field. You
>>>>>> can also specify that as a select with a fixed list of layers.
>>>>>>
>>>>>> On Fri, Jan 10, 2020 at 3:35 PM Christopher Hughes <
>>>>>> chughes at co.lincoln.or.us> wrote:
>>>>>>
>>>>>>> For geomoose 3, is there a way to specify which layers you can
>>>>>>> select rather than just setting
>>>>>>> the default layer and being able to select all layers you've set to
>>>>>>> be selectable? I'd like to create
>>>>>>> a select tool for each of the layers I want to select (like you can
>>>>>>> for searches), but if I do that now
>>>>>>> you'd still be able to switch to a different layer in the tool.
>>>>>>> Relatedly, is there a way to remove the
>>>>>>> 'Select from' dropdown box so it just uses the default layer you set
>>>>>>> in the service?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Chris
>>>>>>>
>>>>>>> --
>>>>>>> Chris Hughes
>>>>>>>
>>>>>>> GIS Analyst
>>>>>>> Lincoln County Surveyor Department
>>>>>>> 880 NE 7th St. l Newport, OR 97365
>>>>>>> Tel: (541) 574 1283
>>>>>>> _______________________________________________
>>>>>>> Geomoose-users mailing list
>>>>>>> Geomoose-users at lists.osgeo.org
>>>>>>> https://lists.osgeo.org/mailman/listinfo/geomoose-users
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Chris Hughes
>>>>>
>>>>> GIS Analyst
>>>>> Lincoln County Surveyor Department
>>>>> 880 NE 7th St. l Newport, OR 97365
>>>>> Tel: (541) 574 1283
>>>>>
>>>>
>>>
>>> --
>>> Chris Hughes
>>>
>>> GIS Analyst
>>> Lincoln County Surveyor Department
>>> 880 NE 7th St. l Newport, OR 97365
>>> Tel: (541) 574 1283
>>>
>>
>>
>> --
>> Chris Hughes
>>
>> GIS Analyst
>> Lincoln County Surveyor Department
>> 880 NE 7th St. l Newport, OR 97365
>> Tel: (541) 574 1283
>>
>

-- 
Chris Hughes

GIS Analyst
Lincoln County Surveyor Department
880 NE 7th St. l Newport, OR 97365
Tel: (541) 574 1283
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20200203/3046a697/attachment.html>


More information about the Geomoose-users mailing list