Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 24 2020 02:56
    tesoromaps starred cmv/cmv-app
  • Dec 15 2020 21:05
    snyk-bot opened #972
  • Dec 08 2020 21:05
    snyk-bot opened #971
  • Dec 04 2020 22:02
    quick6black starred cmv/cmv-contrib-widgets
  • Dec 01 2020 10:53
  • Nov 19 2020 18:11
    ShitalDkal starred cmv/cmv-app
  • Nov 09 2020 13:55
    agraver starred cmv/cmv-app
  • Nov 06 2020 00:14
    j-k-projects starred cmv/cmv-app
  • Oct 30 2020 08:28
    ericanwang starred cmv/cmv-app
  • Oct 24 2020 04:06
    scook12 starred cmv/cmv-app
  • Oct 22 2020 09:06
    msamwill commented #967
  • Oct 20 2020 21:06
    snyk-bot opened #970
  • Oct 16 2020 20:20
    tmcgee commented #966
  • Oct 16 2020 20:16
    tmcgee commented #966
  • Oct 13 2020 17:49
  • Oct 12 2020 15:16
    tmcgee closed #969
  • Oct 11 2020 22:50
    tmcgee review_requested #969
  • Oct 11 2020 22:50
    tmcgee review_requested #969
  • Oct 11 2020 22:50
    tmcgee review_requested #969
  • Oct 11 2020 22:50
    tmcgee labeled #969
ashishgis
@ashishgis
p0
How to change in viewer file, if it's possible so please provide any example for this query
Tim McGee
@tmcgee
@ashishgis I have never used the method referenced of publishing a topic so do not have an example. The majority of widgets in the demo viewer.js use the method I described with preload since it is set to false by default. The identify widget is the only TitlePane widget in the demo that preloads before its TitlePane is opened.
ashishgis
@ashishgis
@tmcgee Thank u so much sir
yogeshsharma505
@yogeshsharma505
@tmcgee Hi I want to open a web form on widget click please provide me steps.Thanks in advance
ivo silvestre
@ivomts

@tmcgee yes, Find operation does not support related records...
I didn't know how to use your Search widget inside my cmv, so I start to work in other way: query my SQL Server stand alone table and zoom the result using an auxiliar field with x,y coordinates. But now I know that it also doesn't support stand alone tables...

Maybe using your Search widget inside the search tab (is what I want instead of using Attributes Tables) is more easy to implement.
Is there anyone with the similar issue?
Thanks!

ashishgis
@ashishgis
@tmcgee Hello, How to wcf service use in viewer page? Pls provide any example of this query. Thanks in advance
Tim McGee
@tmcgee
@ashishgis I don't know of any examples that do this. If I am understanding your question correctly, I assume you'd have to do something like query the WCF Service to retrieve the data and load that into a Feature Layer or Graphics Layer.
@ivomts My Search widget supports the Find operation as well as Query operation including Related Records and standalone Tables that are published as part of a Map Service.
Tess Oldemeyer
@TOldemeyer_gitlab
Can a dynamic sublayer be configured to use ‘Zoom to Layer’ as a subLayerMenu option in layerControl?
Tim McGee
@tmcgee

@TOldemeyer_gitlab You can create a new custom widget using this one as a starting point. It has the basics for querying a sublayer - in this case, to get metadata. (You can simplify the code greatly since that example does more than you need). You would do a similar query to get the complete extent for all features in the layer. A query that ends up something like this:

https://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/MapServer/0/query?where=1%3D1&returnExtentOnly=true&f=json

which returns this:

{
    "extent": {
        "xmin": -122.51129560300001,
        "ymin": 33.75,
        "xmax": -108.60000000000002,
        "ymax": 38.100000000000023,
        "spatialReference": {
            "wkid": 4326,
            "latestWkid": 4326
        }
    }
}

As part of your query, you'll want to reproject the coordinates into the spatial reference used by your map (usually Web Mercator, WKID 102100).

Here's a code snippet for adding the menu for the sublayers.

Hoping this is enough to get you going.

abbas beigy
@abbasbeigy
We are waiting for the update🙂🙂🙂. https://files.gitter.im/cmv/cmv-app/JLbo/image.png
Tess Oldemeyer
@TOldemeyer_gitlab
Thanks to @tmcgee, this code is working to zoom to a dynamic sublayer from the subLayerMenu:
        SublayerZoomTo:{
            include: true,
            type: 'invisible',
            id: 'SublayerZoomTo',
            path: 'dijit/_WidgetBase',
            options: {
                map: true,

                startup: function() {

                    topic.subscribe('layerControl/SublayerZoomTo', lang.hitch(this, '_fetchExtent'));
                },
                _fetchExtent: function (event) {

                    var url  = event.layer.url + '/' + event.subLayer.id + '/query?where=1%3D1&returnExtentOnly=true&outSR=' + this.map.spatialReference.wkid + '&f=json';
                    new Request({
                        url: url,
                        content: {
                            f: 'json',
                        }
                    })
                        .then(lang.hitch(this, function (result) {
                            if (result && result.extent) {
                                var extent = new Extent(result.extent);
                                this.map.setExtent(extent, true);
                            }
                        }))
                        .otherwise(lang.hitch(this, function (error) {
                            topic.publish('viewer/handleError', {
                                source: '_WidgetBase.SublayerZoomTo',
                                error: error
                            });
                        }));
                },
               _handleError: function(e) {
                   this._fetchExtent({
                       id: e,
                       name: 'Error',
                       description: 'The query could not execute.'
                   });
               }
            },
        },
                    subLayerMenu: {
                        dynamic: [{
                            topic: 'SublayerZoomTo',
                            iconClass: 'fas fa-fw fa-search',
                            label: 'Zoom to Layer'
                        }]
                    },
Tim McGee
@tmcgee
:thumbsup:
ERS-Long
@ERS-Long
@TOldemeyer_gitlab Thanks for sharing this code. Just want to point out couple of things if others are going to implement it. 1) that Request is ESRI request, not dojo Request. 2) for secured map service, a proxy prefix url is needed.
Glenn
@RiverGlen
Thanks Tim and Tess for helping us figure this sublayer menus. Cheers!
Tess Oldemeyer
@TOldemeyer_gitlab
@tmcgee Is there a way to incorporate a 3D scene view toggle (within the map view) in the CMV framework?
Gavin Rehkemper
@gavinr
Hi, it looks like there has not been an official github release (https://github.com/cmv/cmv-app/releases) since 2017, but there have been many commits on master since then - is best practice just to use whatever is the latest on master? or is best practice to use the most recent release from 2017? Thanks!
asleepjk
@asleepjk

Hi everyone, I need some help to get a previous value in expression into search widget to automatically updates the next expression, for example in the search configuration:

``` 
                    searchFields: [
                        {
                            field: 'STATE,
                            label: 'STATE',                                

                            expression: '(STATE LIKE \'%[value]%\')',   // STORE  THIS VALUE
                            unique: true,
                            includeBlankValue: true

                        },

         {
                            field: 'CITY',
                            label: 'CITY',
                                                            where: 'STATE LIKE  \'%[value]%\')',   // AND PUT THE PREVIOS VALUE HERE
                            expression: '(CITY LIKE \'[value]%\')', // THIS WOULD BE A DIFFERENT VALUE
                            unique: true,
                            includeBlankValue: true

                        }
                    ],

```

Denverino
@Denverino
Hi everybody. Can you help me please?I added Export widget in my app, but nothing happens when i click Export button...
Tim McGee
@tmcgee
@gavinr Hi Gavin, Good to see you here. The commits you see since the last official release in 2017 are actually in the develop branch, not the master branch. I have consistently used the code in the develop branch for all deployments of CMV for clients since at least 2015 or 2016 without issue. The code for demo app is continuously deployed with each commit to the develop branch. The developers here and elsewhere that I have interacted with on this topic also use the latest code. I hope this helps.
@Denverino Check your configuration for the export widget to ensure you have preload: true. That is a fairly common mistake.
Tim McGee
@tmcgee
@asleepjk I believe you are asking to filter the second "City" list based on the value in the first "State" list. Is that correct? That type of dependency isn't currently implemented in my Search widget. I am sure that type of interaction is possible but the code doesn't support that at present.
Gavin Rehkemper
@gavinr
@tmcgee thanks for the response, that helps. So sounds like like we're not tagging releases, but in general the project tries to keep develop branch in a deploy-able state
Denverino
@Denverino
@tmcgee oh thank you!
Denverino
@Denverino
@tmcgee i have one more the same question. There are no ExportGraphics button in Draw widget(
Denverino
@Denverino
Do i need to add it manually?
Tim McGee
@tmcgee
@gavinr yep that is correct. develop branch should always be deploy-able.
Tim McGee
@tmcgee
@Denverino The Draw widget that is part of the core CMV project does not have the ability to export graphics.
triesco
@triesco
Hello CMV people. Hope everything good. Is there a way to show and hide columns on the attribute table dynamically?? Lets say I made a query with some other parameters, I would like to show some fields and hide other fields. Right now I have the table on the viewer config and all the available fields. Would like to do it dynamically. Any ideas?
Tim McGee
@tmcgee
Hello @triesco, With each query, you can include the columns array specifying the desired columns you want displayed. Instead of recreating that array in the configuration for each query (too much json), you can define all the columns in an array as a variable or object property, then clone that array for each query and show/hide columns as appropriate.
triesco
@triesco
@tmcgee Thank for the reply. And sorry to be a pain, but do you have a sample on how to call the columns ?? For what you are saying about the query, are you refereing to the query.OutFields?? or can I controll the columns after executing the query and managing the columns on the result??
Tim McGee
@tmcgee
@triesco I am not talking about the outFields array. I am referring to the columns array
You can also probably also do it with code after executing the query but if I am understanding correctly, it seems like that's more work that is harder to manage.
Tim McGee
@tmcgee
Your config would include something like this (obviously incomplete):
var cols1 = [
    {
        field: 'PDNAME',
        label: 'Name',
        width: 150
    },
    {
        field: 'ADDRESS',
        label: 'Address',
        width: 150
    },
    {
        field: 'PDTYPE',
        label: 'Type',
        width: 100
    }
];

var cols2 = lang.clone(cols1);
cols2[1].hidden = true; // hides the address field

...
gridOptions: {
    columns: cols2
},
...
Tim McGee
@tmcgee
@triesco If you'd like to pursue a different route, you should explore the dgrid documentation
triesco
@triesco
@tmcgee your solution, as always, worked great. Thanks Tim!
Tim McGee
@tmcgee
:+1:
César Augusto
@carrbrpoa
Hello, how long time!
@tmcgee, do you know if it's possible to append a header to the requests that are made to operationalLayers urls?
César Augusto
@carrbrpoa
Or maybe..any arcgis' requests?
Tim McGee
@tmcgee
@carrbrpoa hello my friend. I'm sure you could do whatever you need within a proxy. If the headers involve any security info or secrets, a proxy would be a more secure approach as well.
César Augusto
@carrbrpoa
Didn't remember that possibility, thought there was a "more built-in" option :)
Thanks @tmcgee !
Tim McGee
@tmcgee
@carrbrpoa If you need/prefer to use the Esri JavaScript API, you could probably use the esri request's setrequestprecallback method.
TamerAburass00
@TamerAburass00
How to change language in CMV wab ??
TamerAburass00
@TamerAburass00
How to change locale in CMV wab ??
ivo silvestre
@ivomts
On Print task, how to not include basemaps on legend? Tks
Tim McGee
@tmcgee
@TamerAburass00 The locale for WAB widgets is determined by the locale within your dojoConfig
Tim McGee
@tmcgee
@ivomts To my knowledge, the basemaps are not included in the legend when using the standard AGS Print Service with the default templates and that any modifications to the legend would require a customization of the Print Service on the server. If you are seeing the basemap included in the legend, my first suspicion is you are using custom Print Service and/or using custom templates? Alternatively, perhaps your "basemap" is added to the map in some other way than CMV's Basemap widget so the PrintTask treats it as an operational layer.
TamerAburass00
@TamerAburass00
I want to change the cmv wab to arabic language , How ??
KhaledMona
@KhaledMona
@tmcgee
How to change language in cmv wab , change to French language ???