|
POST
|
Does anyone know how to replace graphics in a FeatureLayer with a D3.js object. I'm not interested in simply using an SVG path, but actually replacing the node in which the graphic is rendered with a node from a d3 object. I have little experience with d3, but from looking at Esri's documentation and digging into the console, I figure this shouldn't be too difficult. I've included a simple example I would like to get working, but ideally I would eventually use a more complicated d3 object, constructed from feature attributes. require(["esri/map", "esri/layers/FeatureLayer", "dojo/domReady!"], function(Map, FeatureLayer) {
map = new Map("map", {
basemap: "topo",
center: [-97, 38],
zoom: 5
});
var svg = createD3Circle();
console.log(svg);
var featureLayer = new FeatureLayer("myfeatureserviceurl");
featureLayer.on('graphic-draw', function(graphic) {
console.log(graphic);
graphic.node = svg;
console.log(graphic);
//is there anything I can do here to replace each graphic with my svg object.
//or possibly before the graphic even draws
});
map.addLayer(featureLayer);
featureLayer.on('load', function() {
var sType = featureLayer.surfaceType;
console.log(sType);
});
function createD3Circle() {
var svgContainer = d3.select("body").append("svg")
.attr("width", 200)
.attr("height", 200);
var circle = svgContainer.append("circle")
.attr("cx", 30)
.attr("cy", 30)
.attr("r", 20);
return circle;
}
});
... View more
09-29-2017
12:25 PM
|
0
|
4
|
2379
|
|
POST
|
I'm using the JS 4.x API, and pushing a custom action to the popups via the well documented example. However, I would like the custom action to contain a form element. This was possible in the 3.x version of the API (see attached image for example). However in the 4.x version I'm unsure how this would work. I've tried: var setCircleCenterAction = {
title: "Set search center at <input type='number' id='radius-small' size='40' value=20 min='0' max='100' /> miles",
id: "set-circle-center",
className: "glyphicon glyphicon-ok-sign"
};
mapView.popup.actions.push(setCircleCenterAction);
mapView.popup.on('trigger-action', function(event) {
console.log(event);
}); But it doesn't produce the desired results - the title attribute is interpreted as text instead of HTML. Is there any way around this?
... View more
08-23-2017
10:27 AM
|
0
|
0
|
1506
|
|
POST
|
Ahh, thanks again. So I couldn't get it to work with 'openWidget' but I could get an event to fire with 'widgetActived'. It's interesting - the callback only occurs if the user clicks within the widget panel itself (as if to begin using the widget). Just clicking the on screen widget button that displays the panel doesn't trigger the callback itself - the user must click inside the widget and begin actually using it. It's not intuitive, but for my purposes it's actually more useful.
... View more
07-27-2017
08:31 AM
|
0
|
1
|
3005
|
|
POST
|
But what I want to do is subscribe to the opening of any widget from my Google Analytics widget. So something like: var myWidgetNames = ["LayerList","AttributeTable","Legend","Draw"];
for (var i=0; i<myWidgetNames.lenth; i++){
var widget = WidgetManager.getInstance().getWidget(widgetName);
widget.topic.subscribe('openWidget', function(widetName){
GoogleAnalytics.log('widgetOpen', widgetName);
});
}); Does that make sense? I want to detect the opening of any widget in the application from the source code of a single widget in the application...
... View more
07-27-2017
07:08 AM
|
0
|
3
|
3005
|
|
POST
|
Okay, thanks - now that I'm looking at the WidgetManagerClass, I see a triggerWidgetOpen function that publishes an openWidget topic. However, I didn't find any information about that in the documentation. I might need a little help with the code here - supposed I have a widget in my application called "LayerList", and I want to set an event listener in some other widget that triggers when LayerList is opened. I'm unclear what the code would look like. var widgetManager = WidgetManager.getInstance() on.widgetManager.triggerWidgetOpen("LayerList")('openWidget', function(a){ do some stuff; }); I know that's not correct - I'm just not sure how these topics and methods should be used. Any advice would be very helpful. Thanks!
... View more
07-26-2017
01:28 PM
|
0
|
5
|
3005
|
|
POST
|
I'm developing an enhanced Google Analytics widget, one that tracks specific layer interactions, map interactions, etc. etc. I'm curious if there is a way to code the Google Analytics widget to detect and track when a user opens any other (or chosen subset) of application widgets. Given the Google Analytics widget essentially is always running, can I include code in its Widget.js that listens for the creation, opening, or instantiation of other widgets in the application. I looked in the widget manager class, but am unsure if widgets have access to each other (because it makes sense if they are compartmentalized). Thanks!
... View more
07-26-2017
12:54 PM
|
0
|
7
|
3398
|
|
POST
|
Most of our users (99%) will login with their SAML / Enterprise account, and we don't want to confuse users by providing two login options (ArcGIS account AND Enterprise account). However, there are a couple power users, administrators and folks without Enterprise accounts that will need to login using the built in ArcGIS account. It would be great if there was a different sign in page they could go to to use that account, one that is different than the primary login page, and one that shows BOTH login options.
... View more
06-28-2017
07:02 AM
|
1
|
0
|
1589
|
|
POST
|
Thanks Kory Kramer! I have a Dell Latitude E7440 (as do many of my colleagues), which is touch screen enabled (I imagine means it's also pen enabled). I'll let our IT group know about this issue if they don't already and wait around for a fix.
... View more
06-20-2017
05:11 AM
|
0
|
1
|
1686
|
|
POST
|
Hi, we're configuring a SAML compliant identity provider with our Portal 10.4 instance, and plan on disabling sign in in with ArcGIS Accounts so as not to confuse our users. The only reason we're doing this is to hide the extra sign in button (using your ArcGIS Account) so the user is just provided with one sign in button. Doesn't anyone know of a way to remove the that button, but create a back door way for an internal administrator account or folks that don't have an identity provider login to login to the Portal the traditional way (internal account)? The only instructions I've found is disabling entirely signing in with ArcGIS accounts. Thanks!
... View more
06-19-2017
11:59 AM
|
0
|
3
|
2252
|
|
POST
|
My other colleague's machine is is a Dell Latitude E7470
... View more
06-08-2017
09:17 AM
|
0
|
0
|
4924
|
|
POST
|
Mine is a Dell Latitude E7440 - I'll check with my colleagues on theirs but if not the same then very similar.
... View more
06-08-2017
07:46 AM
|
0
|
0
|
4927
|
|
POST
|
In answer to your other questions, I just haven't had the chance to upgrade to 1.4.1, but I could try tomorrow. And yes, I am not even presented with a Pro splash screen or any indication of UI - I am just immediately presented with the error screen attached to my original message. This could most certainly be an isolated incident, I just know that downgrading .NET fixed it on my machine, and I've had some other colleagues with similar issues resolved by downgrading .NET with the latest release of ArcGIS Earth on the same Windows OS.
... View more
06-08-2017
07:33 AM
|
0
|
3
|
4927
|
|
POST
|
KKramer-esristaff I'm on Windows 7 Enterprise SP1 - I've also upgraded through multiple versions of ArcGIS Pro, I believe starting with 1.1. It's unclear if the same problem would occur with a new installation of ArcGIS Pro on a machine with .NET 4.7 upgraded from 4.6.1. Event Viewer error is as follows: Log Name: Application Source: .NET Runtime Date: 6/8/2017 10:26:17 AM Event ID: 1026 Task Category: None Level: Error Keywords: Classic User: N/A Computer: SAWALPEOC111831.ad.faa.gov Description: Application: ArcGISPro.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Runtime.InteropServices.COMException at MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(System.Guid ByRef, System.Object, Int32, System.Guid ByRef) at MS.Win32.Penimc.UnsafeNativeMethods.CreatePimcManager() at MS.Win32.Penimc.UnsafeNativeMethods..cctor() Exception Info: System.TypeInitializationException at MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr ByRef) at System.Windows.Input.PenThreadWorker..ctor() at System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(System.Windows.Input.PenContext) at System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl() at System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets() at System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor() at System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices() at System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(System.Windows.Input.InputManager, System.Windows.PresentationSource) at System.Windows.Interop.HwndStylusInputProvider..ctor(System.Windows.Interop.HwndSource) at System.Windows.Interop.HwndSource.Initialize(System.Windows.Interop.HwndSourceParameters) at System.Windows.Window.CreateSourceWindow(Boolean) at System.Windows.Window.ShowHelper(System.Object) at ArcGIS.Desktop.Core.ProApp+<>c.<ShowBuiltInSplash>b__41_0() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart() Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event"> <System> <Provider Name=".NET Runtime" /> <EventID Qualifiers="0">1026</EventID> <Level>2</Level> <Task>0</Task> <Keywords>0x80000000000000</Keywords> <TimeCreated SystemTime="2017-06-08T14:26:17.000000000Z" /> <EventRecordID>63731</EventRecordID> <Channel>Application</Channel> <Computer>SAWALPEOC111831.ad.faa.gov</Computer> <Security /> </System> <EventData> <Data>Application: ArcGISPro.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Runtime.InteropServices.COMException at MS.Win32.Penimc.UnsafeNativeMethods.CoCreateInstance(System.Guid ByRef, System.Object, Int32, System.Guid ByRef) at MS.Win32.Penimc.UnsafeNativeMethods.CreatePimcManager() at MS.Win32.Penimc.UnsafeNativeMethods..cctor() Exception Info: System.TypeInitializationException at MS.Win32.Penimc.UnsafeNativeMethods.CreateResetEvent(IntPtr ByRef) at System.Windows.Input.PenThreadWorker..ctor() at System.Windows.Input.PenThreadPool.GetPenThreadForPenContextHelper(System.Windows.Input.PenContext) at System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTabletsImpl() at System.Windows.Input.StylusWisp.WispTabletDeviceCollection.UpdateTablets() at System.Windows.Input.StylusWisp.WispTabletDeviceCollection..ctor() at System.Windows.Input.StylusWisp.WispLogic.get_WispTabletDevices() at System.Windows.Input.StylusWisp.WispLogic.RegisterHwndForInput(System.Windows.Input.InputManager, System.Windows.PresentationSource) at System.Windows.Interop.HwndStylusInputProvider..ctor(System.Windows.Interop.HwndSource) at System.Windows.Interop.HwndSource.Initialize(System.Windows.Interop.HwndSourceParameters) at System.Windows.Window.CreateSourceWindow(Boolean) at System.Windows.Window.ShowHelper(System.Object) at ArcGIS.Desktop.Core.ProApp+<>c.<ShowBuiltInSplash>b__41_0() at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at System.Threading.ThreadHelper.ThreadStart() </Data> </EventData> </Event>
... View more
06-08-2017
07:28 AM
|
0
|
0
|
4927
|
|
POST
|
Anyone have problems when they upgrade (or their company installs for them) .NET 4.7 (upgraded from 4.6.1)? ArcGIS Pro 1.4 suddenly won't open. When I downgrade to the previous version of .NET ArcGIS Pro works just fine. I think this might be a bug. I've also had some colleagues with issues opening the latest version of ArcGIS Earth (upgraded from previous versions) that was also fixed by downgrading .NET from 4.7 to 4.6.1. Anyone else having this problem?
... View more
06-07-2017
01:43 PM
|
2
|
13
|
8764
|
|
POST
|
Whew! That was so long ago. It might have had something to do with the FeatureLayer mode (ondemand, selection, snapshot, etc. etc.). But in all truth, I pretty much forget what I did to fix it.
... View more
05-24-2017
09:41 AM
|
0
|
0
|
1264
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 02-23-2026 11:00 AM | |
| 1 | 07-08-2025 11:33 AM | |
| 1 | 11-07-2023 08:32 AM | |
| 2 | 10-01-2025 06:52 AM | |
| 5 | 09-08-2025 07:31 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-04-2026
01:35 PM
|