Esri / application-boilerplate-3x-js

Starter application that simplifies the process of building templates for the ArcGIS.com template gallery.
https://developers.arcgis.com/javascript/
Apache License 2.0
90 stars 68 forks source link

Get only items with type="Web Map" in group #34

Closed sumitzarkar closed 9 years ago

sumitzarkar commented 9 years ago

I want to get only items with type="Web Map" in group, I don't see any options to change the query in groupParams. Where should i update the parameter to get only webmaps.

driskull commented 9 years ago

hi @sumitzarkar you can put query options in the groupParams object in templateOptions.js.

http://resources.arcgis.com/en/help/arcgis-rest-api/#/Search/02r3000000mp000000/

sumitzarkar commented 9 years ago

Hi @driskull Thanks for your reply.

I tried configuring query options in the groupParams object in templateOptions.js, but then we were not able to access the groupid which is configured in config/default.js. We have configured groupid in config/default.js, but if we set query in templateOptions.js then we need to configure the groupid in two places if the query contains the groupid.

For e.g. If we want to query particular group in that group we want to access items with type "Web Map" then the query would be "group:\"\" AND type=\"Web Map\"".

driskull commented 9 years ago

hey @sumitzarkar that's a great point. I've added a string.substitue function so you won't have to put the group id in two places and it will allow you to customize the query string as much as you'd like. Let me know if thats better.

sumitzarkar commented 9 years ago

Thank you @driskull. This looks good.

driskull commented 9 years ago

awesome! :+1: