POST
|
The manifest files for the widget itself and the builder and viewer apps have that setting pegged as "false"; however this is useful info because I haven't seen this documented anywhere.
... View more
12-16-2016
11:36 AM
|
0
|
1
|
588
|
POST
|
I have a custom widget where I wanted to use its config file to hold a URL for a help page. Using the example from the "Make widget configurable" page, I put the URL in the widget's config.json file. In the widget's HTML template, I embed the URL in an anchor tag using ${config.helpUrl}. When the widget is opened in the application, a widget error occurred because the JSON couldn't be read in. I then edited the widget's config entries in the widgets-manifest and widgets-manifest-builder files to read "hasConfig: true". After that change, the widget loaded, the URL was embedded, and the help file opened upon a click of the icon in the HTML template. Here's the problem (finally): when the widget is loaded into a new application through the Web App Builder, the configuration page displays but never resolves. The console error is "ace is not defined"; the error occurs in builder/main.js at line 888 (app is on an intranet, so I can't post the stack trace). I can click the "OK" button and the widget is added to the app, but I don't want to have to add a caveat to our documentation that says "click OK on the config page". Are my config files configured incorrectly?
... View more
12-16-2016
09:27 AM
|
0
|
3
|
2167
|
POST
|
Apologizing in advance for not being able to post code...I have a feature layer initialized from an empty feature collection. Based on user input I query a map service, retrieve a country geometry from the map server, and add it to the feature layer. I want to use CSS to style the feature using an animation. In the CSS styling examples on GeoNet the feature layers are created by URL (or in one case from a CSV file) and already have features when they are added to the map. My feature layer is initialized with "styling: false", data attributes set to attributes being returned from the map server, and I have path statements in my CSS file. Styling is applied during the "graphics-draw" event; I put a break point in Firebug to make sure all the graphics in the layer are being passed through the function and that their attributes are described correctly. I also tried setting a class name on the feature layer and defining a CSS path with no attribute parameter. I can't figure out why it isn't working, which is why I wonder if the way my feature layer is implemented doesn't lend itself to CSS styling.
... View more
12-24-2014
06:19 AM
|
0
|
0
|
2440
|
POST
|
I got this from an earlier post and used it to place an "arrow" (actually the letter "V") at the center of a polyline. Using your variables: var rise = endX - startX; var run = endY - startY; var angle = (180/Math.PI) * Math.atan2(run,rise); ... textSymbol.angle = angle;
... View more
12-24-2014
05:32 AM
|
0
|
3
|
1078
|
POST
|
As Emily Litella would say: "Never mind." Both layers had the same ID specified in its layer parameters. All is right with the world.
... View more
07-03-2014
09:39 AM
|
0
|
0
|
185
|
POST
|
Until recently, I had 2 cluster layers on my map. Only one layer would ever contain data and be displayed at any time. Now I have a situation where I need to add a 3rd cluster layer and display data simultaneously from 2 of the layers. The layers are created and added to the map after the map load event has fired (call them "Cluster 1" and "Cluster 2"). What I'm finding is that Cluster 1 is drawing just fine; Cluster 2 doesn't display any markers at all. If I switch the layer add order, then Cluster 2 draws and Cluster 1 doesn't. No errors in Firebug, no data problems in either layer. I've looked through the cluster layer code and I don't see anything obvious that precludes the second cluster layer from drawing. Wish I could post code, but the app is still on an intranet. Any ideas?
... View more
07-03-2014
07:33 AM
|
0
|
1
|
459
|
POST
|
One thing that jumps out at me - your lat/long values need to be numbers instead of strings. Try entering your lat/longs as numbers in your "treePointInfo" array, or convert the lat/longs to numbers using "parseFloat" when you convert your array into a map.
... View more
04-02-2014
05:04 AM
|
0
|
0
|
337
|
POST
|
Couldn't get your Fiddle feature layer to load because of the password dialog (I'm guessing); I'm on an intranet so I can't post my code. I tried adapting the side panel example to load the popup window content in a jQuery dialog. I had problems with the "infoWindow.selectPrevious()" and "infoWindow.selectNext()" commands (as in they don't seem to exist - maybe because I'm using JSAPI v. 3.7?) so I went in a different direction. My app has a basemap, feature layer, and cluster layer. Data are loaded by server query; if the response has a time extent it's loaded in the feature layer, otherwise it's loaded into the cluster layer. The map is initialized with "showInfoWindowOnClick" to false; the map's info window is set to a popup object; the popup listens for "set-features" events; the feature layer listens for "click" events. When the user clicks on the feature layer, all features at the click point are put in an array and the array is added to the popup window which triggers the "set-features" event; the popup window's "show" function is not executed. The content from the popup's selected feature is passed through a function to the jQuery dialog, which opens on top of the map in the lower left hand corner. "Next" and "Previous" buttons are part of the dialog; I have a feature index variable and use that to call the "popup.select" function when either of those buttons are clicked. Since the cluster layer has its own click function, I changed the cluster layer code to make sure the popup doesn't display. Don't know if any of this helps you; seems to me at the very least your feature layer needs a click listener to route the feature to the info window and thus trigger the appropriate event.
... View more
03-17-2014
02:33 PM
|
0
|
0
|
700
|
POST
|
Ryan, Did you solve this? I have a function much like yours in my application - click on or around a marker in a graphics layer, create a 20x20 pixel extent around the click point, figure out which markers are contained by the extent and put them in an array, then set the popup's features to the array. The only major difference I see between your implementation and mine is in my map initialization - I set the parameter "showInfoWindowOnClick" to "false". Give that a shot...
... View more
03-11-2014
07:47 AM
|
0
|
0
|
1190
|
POST
|
Has anybody tried this? I'd like to fade in the features of a time aware layer when the time extent changes. I see there's a graphic-draw event in the feature layer. Fade out might be a little more problematic or not possible due to the events associated with removing a graphic from the display.
... View more
03-06-2014
12:56 PM
|
0
|
0
|
392
|
POST
|
Matthew, I consider my programming skills to be "an inch deep and a mile wide". For the last couple of years I've worked on teams with much more knowledgeable staff who determine the application frameworks. That being said, I've been able to integrate the JSAPI with the Ozone widget framework and jQuery on one project, and jQuery and Bootstrap on another. Biggest problem I've had to date has been CSS issues with Bootstrap that were overcome with some custom CSS for the map. I've also brought in other modules such as Nianwei Liu's TOC library, Patrick Wied's heatmap library, and the cluster layer script and they've worked just fine in our environments. Best advice I can give: Google is your friend, and ask the forum and you will (usually) be rewarded.
... View more
03-03-2014
08:52 AM
|
0
|
0
|
400
|
POST
|
I added the following public function to ClusterLayer.js: refreshData: function(data) {
this.clear();
this._clusterData = data;
this._clusterGraphics();
}, This permits you to refresh the data set and generate a new set of clusters. Now you don't need to destroy and re-create the cluster layer. If the upper limit of the cluster layer's last renderer break is not set to "Infinity" you might need to delete and re-create the last break in the renderer.
... View more
02-13-2014
12:55 PM
|
0
|
0
|
431
|
POST
|
In your code snippet for your "selectCountries" function you have "e" as your event input, but "evt.graphic" as the initialization value for "graphic". Is that a typo? Otherwise, "evt.graphic" will always be undefined and you should replace it with "e.graphic".
... View more
02-12-2014
05:03 AM
|
0
|
0
|
393
|
POST
|
Maybe I'm missing something here, but couldn't you just hide the time slider's div when you don't need it instead of destroying it? If you need to change any time slider parameters, change them, run "timeSlider.startup()", then show the time slider's div.
... View more
02-12-2014
04:34 AM
|
0
|
0
|
348
|
POST
|
If I'm reading this correctly, you want to use the renderer symbology but the symbol you're adding to the graphic is what's being drawn. If that's the case, try using 'null' as your symbol value in the graphic constructor.
... View more
02-07-2014
08:56 AM
|
0
|
0
|
805
|
Title | Kudos | Posted |
---|---|---|
1 | 07-08-2013 09:50 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|