Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Feb 04 20:25
    reyemtm commented #973
  • Feb 04 20:23
    reyemtm commented #973
  • Feb 04 20:15
    reyemtm opened #973
  • 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
Tim McGee
@tmcgee
image.png
@yogeshsharma505 You can use the demo site to demonstrate how well Esri + CMV already support your local Arabic dialect by adding ?locale= to the url. Here is an example using Egyptian Arabic.
Tim McGee
@tmcgee
@yogeshsharma505 These widgets included with CMV should already have good locale support for Arabic:
  • Bookmarks
  • Directions
  • Editor
  • Home Button
  • Legend
  • Locate Button
  • Measure
  • Overview Map
  • Scalebar
  • Search
yogeshsharma505
@yogeshsharma505
CMV is really very useful and time saving ..my requirement is i want to change complete layout to RTL like widgets should come in right side and map is left side...Thanks in advance
@tmcgee Thanks for ur reply really it very useful
Tim McGee
@tmcgee

@yogeshsharma505 You can easily move the widgets to the right side of the page. Here's a copy of the demo site's viewer.js with a pane on the right side holding all the widgets.

The only changes are configuring a right pane while hiding the default left pane in panes section and then configuring each widget to be in the right pane.

yogeshsharma505
@yogeshsharma505
@tmcgee Thanks for your help we are working on that.we will come back to you for more help...Thanks
Robert Jones
@rjones0
I have a question about compatibility, which I have a feeling might be a silly question, but nonetheless since I couldn't find this information anywhere: is CMV compatible with ArcGIS Server 10.4.1? I am guessing the answer is yes, because CMV talks to Server via the REST API, and CMV is compatible with the REST API going back possibly to the inception of the REST API i.e. 10.1 or possibly even earlier. Grateful for clarification. Thanks
yogeshsharma505
@yogeshsharma505
Can we implement 3D as well?
Tim McGee
@tmcgee
@rjones0 I have multiple customers that are using CMV with AGS version 10.3.1 without issue (upgrading soon). Theoretically, CMV and the ArcGIS Javascript API is compatible back to AGS version 10.1 . Some of the Esri sample servers are still running 10.1! Those servers have some compatibility issues with modern browsers around security but nothing specific to the ArcGIS Javascript API or CMV that I am aware of.
Tim McGee
@tmcgee
@yogeshsharma505 The current version of CMV hosted on GitHub works with version 3.x of the ArcGIS Javascript API. That version of the API does not support 3-D. I have a version of CMV that works with version 4.x, including 3-D. However, that version is not available on GitHub. I've stopped guessing when I might release that version beyond a few of my existing customers who supported that effort. Working with the current CMV and supporting my customers has kept me very busy these past few years.
Robert Jones
@rjones0
@tmcgee many thanks! Exactly what I needed
ivo silvestre
@ivomts

Hi!

I’m trying to use cmv's find.js to query related records. I wonder if you can give me some advices?

Basically, I’ve a rest MapServer serving a Feature Layer related to a Table Layer.
What I need to do is to find a feature in the Table Layer, return some fields into the grid columns and zoom to the correspondent element in the Feature Layer.

{
description: 'test',
url: 'http://myserver/arcgis/rest/services/test/MapServer/',
layerIds: [4],
relatedTableId: 14,
searchFields: ["relationships/0/serie"],
minChars: 2,
gridColumns: [
{ field: 'snno', label: 'snno', width: 100, sortable: false, resizable: false },
{ field: 'u_mcons', label: 'u_mcons' },
{ field: 'serie', label: 'Nr serie' }
],
sort: [
{
attribute: 'u_mcons',
descending: false
}
],
prompt: 'p.e. "123456"',
selectionMode: 'single'
}

Thanks in advance.

Tim McGee
@tmcgee
@ivomts Are you asking about my Search widget? If so, there is an example that includes searching related records here
yogeshsharma505
@yogeshsharma505
@tmcgee Hi really appreciated .. Actually in my current project i need to deal with 2D as well as 3D so it will be great if you provide me solution using AGS JS 4.X version.Thanks in advance
ivo silvestre
@ivomts
@tmcgee Can I instead search for related records directlly using the queries parameters inside find.js?
Tim McGee
@tmcgee
@ivomts I think you are trying to use the Find widget. It uses the find operation of a Map Service. I am fairly certain that does not support related records.
yogeshsharma505
@yogeshsharma505
@tmcgee Thanks I understood due to some technical things we can not use 4.X for both 2D & 3D as of now but after some time we can.
ashishgis
@ashishgis
@tmcgee How to add and remove widget dynamically in cmv app
@tmcgee Please suggest solution, Thank in advance
Tim McGee
@tmcgee
@ashishgis you can load a widget at any time by publishing a topic. Removing widgets is a bit more problematic because of the dojo code needed to completely clean up the widget. I usually just show and hide widgets using CSS or other methods. If you use preload in the config effectively, the widget does not actually load until you want to show it. For example, by default a widget is not loaded until the TitlePane (or ContainerPane) that contains the widget is opened.
ashishgis
@ashishgis
@tmcgee Thank u
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.