POST
|
Hi, I was reading the arcgis 4.11 version API, and the Compass Widget Tutorial, so I was wondering, if I want to do a Compass Widget, I have to use 4.11 version. But, the Compass Widget Tutorial says that I have to create a MapView, and then pass this view to the Compass Widget, so, to make a personal widget inside Web AppBuilder, What container's value have I pass to the MapVIew constructor? Because MapView instance requires a DOM node.
... View more
05-25-2019
03:20 PM
|
0
|
0
|
625
|
POST
|
Hey Ken Buja, that was really helpful. That tip was very interesting. But now, I have one more question ... A little bit far from this thread... Look: I have a widget that allow classify by fields and depending It changes layer visualization. So, this widget was developed with JS API version 3.17, when I put that widget in latest WAB (latest WAB manages JS API version 3.21), this widget does not work. Not clasifies satisfactorily. My solution was replace the apiVersion value by 3.17 and then it worked. The cuestion is: Why this widget not work correctly on 3.21 version, but 3.17 version yes?
... View more
09-21-2017
02:11 PM
|
0
|
1
|
742
|
POST
|
I'm getting this error when I try to classify a field like this example: ArcGIS API for JavaScript Sandbox
... View more
09-20-2017
06:15 PM
|
0
|
3
|
1290
|
POST
|
(copy this code and apply format) createLegend: function () { var hideLayers = this.parameters.idHideLayers; var layer = this.parameters.layer; var title = this.parameters.layer.title; if (!this.legend) { htmlF = "<div id='legendDiv' ></div>"; var node = domConstruct.toDom(htmlF); domConstruct.place(node, 'legendField'); this.legend = new Legend({ map: this.map, layerInfos: [{ hideLayers: hideLayers, layer: layer, title: title } ] }, 'legendDiv'); this.legend.startup(); }else{ this.legend.refresh([{ hideLayers:hideLayers, layer:layer, title:title }]); } } Once created the legend, I tried refresh instead destroy it. So that was the solution, refreshing the legend by passing the same parameters in 'layerinfos' (being hideLayers optional)
... View more
02-14-2017
08:10 AM
|
1
|
0
|
886
|
POST
|
Thanks Robert for your response. But there are something that I cannot understand. When I call the refresh method, can you explain me which parameters I must pass to this method? Show me an example please according with my code, the documentation is not clear. In my legend constructor I'm passing hideLayers,title and layer.
... View more
02-13-2017
07:58 AM
|
0
|
1
|
886
|
POST
|
This is the problem: I'm developing a widget that allows classify the visualization of thematic layers depending of selected field. So, when I apply the render the first time, the legend works fine. Now, if I change de layer, it applies the render but legend take the default value, not the current value. This happens sometimes but not always, I don't understand what is hapenning. This is my code when I create the Legend: createLegend: function () { htmlF = "<div id='legendDiv' ></div>"; var node = domConstruct.toDom(htmlF); domConstruct.place(node, 'legendField'); this.legend = new Legend({ map: this.map, layerInfos: [{ hideLayers: this.parameters.idHideLayers, layer: this.parameters.layer, title: this.parameters.layer.title } ] }, 'legendDiv'); this.legend.startup(); this.legend.refresh(); } The Legend also takes an array of sublayer Ids that will be hide.
... View more
02-09-2017
12:13 PM
|
0
|
3
|
2357
|
POST
|
Robert, if you print the map object in console, you can find it: Map> ItemInfo > ItemData > operationalLayer > array (depending). That is that I mean. This layers has not subLayerVisible attribute like image above, this layers has this attribute instead: I want to make a widget like legend widget, that it's listening when a layer is not visible at a current scale. I thought that LayerInfos class (in jimu.js) would help me here, but no. LayerInfos object only listen when I disabled a layer from LayerList widget. I hope you can understand me.
... View more
02-01-2017
01:01 PM
|
0
|
1
|
509
|
POST
|
I want to get the information about sublayer visible, but, from operational layers (this.map.getLayersVisibleAtScale()) In widget legend, this information is getting from layerInfos class, but, Is there any propertie like this with the operational layers? I want something like this:
... View more
02-01-2017
11:03 AM
|
0
|
3
|
1476
|
POST
|
I put a marker symbol in the map every time when the user click there, then, I enable the popup for a specific layer. When I click the map, It shows both marker and infowindow. It should not show the infowindow because is enabled for a layer (point, polygon...) not for basemap. At basemap only should appear the marker, and if the click coincides with the layer too, they will appear this two elements.. Why this is happening? What is the solution?
... View more
01-05-2017
12:05 PM
|
0
|
1
|
1039
|
POST
|
Robert, That's not working like I want. Because, if I disable the infoWindow, the layer (that has enabled that popup) not listen that event. And the user will be confused. So, is there some event listener to this? I want to know when the popup is enabled or disabled and when I disable that from checkbox widget the LayerList widget must know and the option 'disable popup' must change to 'enable popup' again like the begining. Or also, when I enable a popup, the checkbox widget should change to disabled. I think this problem can be solved by some of the above solutions. Now I have this code: if(this.map.infoWindow.isShowing){ //change to true if any popup is enabled this.checkedFunction(false); //change the widget appearance this.checkbox.set('checked', false); //uncheck checkbox this.map.graphics.clear(); //erase the marker this.map.setInfoWindowOnClick(false); //disable popup return; } What do you think? or What do you know about this?
... View more
01-01-2017
12:14 PM
|
0
|
0
|
605
|
POST
|
Yeah, now I'm working in other alternative. When I click the map, it will only appear a marker in the map (a graphic) and the information will be in the widget space. But there is an inconvenience, if I enable the popups for other layers. So when I click the map, besides the marker, also appear the popup at same place. It's something like confusing. They mix. Is there some relation between graphics and symbols? Why is happening this?
... View more
12-31-2016
06:27 PM
|
0
|
2
|
605
|
POST
|
Robert, Is there an alternative to this? or is necessary decide which is going to show?
... View more
12-29-2016
06:32 PM
|
0
|
4
|
605
|
POST
|
Hi, In my application I have several layers with respective popup, which I can (en/dis)able from layerList widget. But, at same time I can (en/dis)able other popup (in a widget apart) for basemap layer. Here is when I want to make this, have two popups, in case the user clicks the layer, would appear these popups.
... View more
12-29-2016
05:52 PM
|
1
|
6
|
1810
|
Title | Kudos | Posted |
---|---|---|
1 | 02-14-2017 08:10 AM | |
1 | 12-29-2016 05:52 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|