POST
|
Hey mate. Haven't looked at this in ages so had to refresh my memory . The demo is using a couple of feature layers and a graphics layers. Just try it out with any type of layer, it should work the same as a regular popup. Not sure about layers from a webmap though.
... View more
10-03-2019
04:06 PM
|
0
|
0
|
1027
|
POST
|
Hi Rene, Thanks for the response! Originally I tried the following in a custom *.d.ts file, just to create a fake export that was an object with a constructor and the right properties. declare namespace __esriExtend {
interface BaseLayerView2DConstructor {
new(properties?: any): __esri.BaseLayerView2D;
}
export const BaseLayerView2DBase: BaseLayerView2DConstructor;
}
declare module "esri/views/2d/layers/BaseLayerView2D" {
import BaseLayerView2DBase = __esriExtend.BaseLayerView2DBase;
export = BaseLayerView2DBase;
} That produces the error - Duplicate identifier 'BaseLayerView2D'. The same error occurs with your suggestion. There can't be two: declare module "esri/views/2d/layers/BaseLayerView2D" in the one project. I can get around it by commenting out the 4.10 typings module declaration, but obviously that's not ideal. Can you think of anything else sorry? If it just means waiting for 4.11, in my case that's not so bad. Is there an expected release date? Thanks, Nick
... View more
01-08-2019
02:20 PM
|
0
|
0
|
427
|
POST
|
Hi, In 4.9 extending a BaseLayerView2D was simple as in the following: import BaseLayerView2D = require("esri/views/2d/layers/BaseLayerView2D");
class ExtendedLayerView extends BaseLayerView2D {
// implementation...
} In 4.10 the typings have changed so that BaseLayerView2D is an interface instead of a class, therefore extends won't work. Have only worked out a very hacky way to call createSubclass to make it work...but lose all static typing with the class then as well. Any ideas how to correctly extend BaseLayerView2D using v4.10 typings? Thanks!
... View more
01-07-2019
03:47 PM
|
0
|
2
|
575
|
POST
|
Sorry for the spam comments...but just tried that out and it worked a treat!
... View more
12-19-2018
04:25 PM
|
0
|
1
|
2089
|
POST
|
Ohhh...I think i misunderstood, now I get what you mean. Draw on the custom canvas, separate animation loop or whatever, but don't display it I guess, then draw that canvas contents to the internal api context as part of the render pipeline loop. That would keep the drawn layer in the normal flow. Once again, thanks!
... View more
12-19-2018
04:20 PM
|
0
|
0
|
2089
|
POST
|
Ok cool. Will give that a crack. I had originally tried creating and drawing on a new canvas as that worked prior to 4.10, and it draws fine using my own animation loop, but it was then outside the flow of the general map and it's layers. As in setting properties on the layer wouldn't affect the drawing, ie: opacity, visible, ordering, so basically broke the api to the layer. Could manually handle these except for the ordering I imagine though. Anyway, will give that another go - thanks for your help!
... View more
12-19-2018
03:59 PM
|
0
|
0
|
2089
|
POST
|
Hi Yann, Yeah I've been trying to use BaseLayerView2D, but just can't get it quite right. It's working ok without the fade out of the existing drawing, so essentially an object will move around the canvas but without the trail. I can't stop it from clearing the context on each render call. Even with this happening, there is some flicker when zoomed out though. I'm using render() and requestRender() to form the animation loop, so something is happening in that pipeline that won't maintain the previously drawn frame into the current frame...or more likely I'm just doing it wrong . I'm guessing this has to do with the copying of the 2d context canvas to the webgl context for the actual drawing?? Have overridden the BaseLayerView2D containers doRender() method and played around in it a little to try and get around this, but no joy so far. Didn't want to go too far down the hole of overriding api code though. I've been trying all of this on a new layer that which will behave very similar to the existing one, but will be driven by feature polygons and not just GRIB data so it's more generic. If I put the progress on github, whenever you get a chance would you be able to take a look? Thanks, Nick
... View more
12-19-2018
03:34 PM
|
0
|
5
|
2089
|
POST
|
I'm currently using one custom layer and am building another that draws on a canvas manually in a map view. The existing one is here: https://github.com/nickcam/AnimatedEnvironmentLayer In v4.9 at a high level the following steps would allow this to happen. - Subclass a layer - Create a new canvas element and append it to the container element of the layer. - If a feature layer swap the context of the layer with one created from the new canvas. In 4.10 with the drawing occurring all in one webgl context (which is great by the way!), I can't inject a new canvas to essentially replace the svg or the existing canvas for an individual layer. I've tried using the BaseLayerView2D and can get part of the way, but each render() call seems to clear the context and I'm looking to maintain drawing across frames as in the layer linked above. I don't have a simple example of this at the moment but can put one together if it would help. Are there any examples or patterns that could help with this? Perhaps a custom draw BaseLayerView in a future release?
... View more
12-19-2018
01:40 PM
|
0
|
7
|
2439
|
POST
|
You are an absolute legend! This was driving me crazy - thank you so much! I had read those docs earlier trying to sort this out, I don't think they quite explain what's required for deleting...solution makes sense when you see it . Thanks again!
... View more
10-27-2018
03:56 AM
|
0
|
0
|
2968
|
POST
|
I'm using a client side data source on a feature layer When calling applyEdits with addFeatures specified, the object Id field on the feature layer definition and therefore the value set on the graphics attributes is not being honored when the features are added. See this codepen for an example: https://codepen.io/anon/pen/BqvEPm?editors=1010 Two features with objectIds set in the attributes are passed to applyEdits(), but when being added the object Ids are automatically calculated by incrementing the max existing object Id and the attribute value is disregarded. You can see it in the console or in the popup for the features in the example. The delete button won't delete anything as the object ids don't match anymore. This feels like a bug, or is it by design? If a bug, any known workarounds? I haven't tried it on a layer with a service source, as it seems specific to MemorySourceWorker though I'm guessing a service source is probably ok. Thanks!
... View more
10-25-2018
06:03 PM
|
1
|
8
|
4248
|
POST
|
Hi All, I'm loading up a WMSMapLayer ok. But I can't seem to set the STYLES parameter in GetMap requests. I need something similar to the following url to be sent with each request. Currently the STYLES parameter is always empty. http://www.somewmsurl?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&BBOX=-61.7733927083513094657974,83.8673916720936318824897,11.7276043757079584395342,179.999995508414627920502&WIDTH=1001&HEIGHT=765&LAYERS=LayerABC&STYLES=group2&EXCEPTIONS=XML&FORMAT=image/png&BGCOLOR=0xFEFFFF&TRANSPARENT=TRUE I've tried adding custom parameters to a IWMSMapLayer3 as below, but that just appends the STYLES parameter to the end of the url with the empty STYLES parameter still existing beforehand, so it doesn't work. IWMSMapLayer3 wms3 = (IWMSMapLayer3)wmsMapLayer;
IPropertySet customProps = new PropertySet();
customProps.SetProperty("STYLES", "group2");
wms3.CustomParameters = customProps; I've also tried using the Style property of the IWMSLayer2 interface. This property is of type IWMSLayerStyleDescription. https://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#IWMSLayer2_Style.htm IWMSLayerStyleDescription doesn't seem to have any class that implements it..not that I can find anyway, so I can't instantiate the Style property?? I'd even be willing to intercept the request before it's sent and manually change the url if that's the only option, anyone know of an event or interception point where I could do this though? Thanks!
... View more
02-15-2018
09:25 PM
|
0
|
0
|
342
|
POST
|
I was waiting for drawing tools as well, but then couldn't wait any longer so rolled my own. Put them in this github repository a while ago. I think I need to update the version in that repo actually...but anyway, it may help you out. https://github.com/nickcam/angular2-esri-netcore
... View more
09-21-2017
09:25 PM
|
1
|
1
|
996
|
POST
|
Hi, I have some users that were desperate for WMS support but this bug is a bit of a deal breaker to using them right now though . So I created a simple patched class that inherits from WMSLayer to get around the bug until it's fixed. It's not super pretty but good enough for the interim. It's in typescript but moving the relevant bits into a javascript class should be super simple. Thanks, Nick
... View more
07-30-2017
02:59 PM
|
0
|
0
|
3313
|
POST
|
Hi Guys, I know this on the todo list...but couldn't find a scheduled release number for it. Is there an ETA or has it been assigned to a future release yet? Thanks, Nick
... View more
04-03-2017
11:11 PM
|
0
|
1
|
563
|
POST
|
I needed something in the interim so created a drawTools class as well. It's in this project: https://github.com/nickcam/angular2-esri-netcore Although the project is angular2 the drawTools class has no angular dependencies so you could copy it to another project.
... View more
01-24-2017
07:38 PM
|
0
|
0
|
940
|
Title | Kudos | Posted |
---|---|---|
1 | 06-10-2015 06:23 AM | |
1 | 01-24-2017 07:26 PM | |
1 | 09-21-2017 09:25 PM | |
1 | 01-13-2016 07:11 PM | |
1 | 10-25-2018 06:03 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|