POST
|
Hi, Following those discussions, is it possible in 4.11 to create a custom Stream Service? or create a Stream Layer with our own websocket connection? if it is, how do we do that? Thanks for your help
... View more
04-23-2019
06:24 AM
|
0
|
3
|
3781
|
POST
|
Hello, For a project, I am working on an app based on multiples FeatureLayers with the version 4.11. The changes on the map are send with a WebSocket to the others clients online. We must be able to see the changes on the view without any action, so without any refresh. I tried, on recommandation, to separate the actions, one FeatureLayer interacting with the serveur and its "copy" managing the client. We could theoretically use applyEdits on both every time we update or add a feature from the view or from the WebSocket. This is how I create the new client FeatureLayer (remember that we have multiple FeatureLayers) : async function clientFeaturelayerList(layers: FeatureLayer[]) { let clientFL = layers.map(async (layer) => await layer .queryFeatures() .then((results) => { let collection = new Collection<Graphic>(); collection.addMany(results.features); let clientFL = new FeatureLayer({ source: collection, title: layer.title, id: `client_${layer.layerId}`, layerId: layer.layerId, objectIdField: layer.objectIdField, fields: layer.fields, renderer: layer.renderer, opacity: layer.opacity, displayField:layer.displayField, }); return clientFL; }) ); const clientFLList = await Promise.all(clientFL); return clientFLList; But it doesn't work. at least not when I use the featureTemplate to add a new feature. I don't see the templates in the featureTemplates, just a blank space. If I use the serverFeatureLayer for the featureTemplates, I do see the templates with the renderer but the function doesn't work. The new feature doesn't appear in the view even if it is send to the server and appear in the client graphics collection. The problems may come from the templates : templates.on("select", evtTemplate => { const Id = evtTemplate.item.layer.layerId; const newTemplate = new Graphic(); newTemplate.attributes = evtTemplate.template.prototype.attributes; or from the applyedits, or even the treatments of the renderers createAttributes(newTemplate); const editFeature = new Graphic({ geometry: event.mapPoint, attributes: newTemplate.attributes }); console.log(editFeature); const edits = { addFeatures: [editFeature] }; serveurFL.applyEdits(edits); clientFL.then(value => { let FL = value.find(layer => layer.layerId === serveurFL.layerId); FL.applyEdits(edits).then((result) => { console.log(result.addFeatureResults[0].objectId); view.goTo(result.addFeatureResults[0].objectId); }); }); I don't know what to do. Can someone help me, please?
... View more
04-05-2019
07:38 AM
|
0
|
0
|
552
|
POST
|
Oh Thanks, I didn’t know De : Robert Scheitlin, GISP Envoyé : lundi 1 avril 2019 15:00 À : Axelle Ribault <axelle.ribault@magellium.fr> Objet : Re: - Re: Typescript types with the version 4.11 for the new Widgets <https://community.esri.com/?et=watches.email.thread> GeoNet Re: Typescript types with the version 4.11 for the new Widgets reply from Robert Scheitlin, GISP <https://community.esri.com/people/rscheitlin?et=watches.email.thread> in ArcGIS API for JavaScript - View the full discussion <https://community.esri.com/message/842340-re-typescript-types-with-the-version-411-for-the-new-widgets?commentID=842340&et=watches.email.thread#comment-842340>
... View more
04-01-2019
06:02 AM
|
0
|
0
|
385
|
POST
|
Hi, I'm working with the API 4.11 with typescript. I can't find the types for the new classes like the Editor Widget. Should I declare new types, will the types be updated soon, or am I missing something ? Thanks
... View more
04-01-2019
12:00 AM
|
0
|
2
|
489
|
Title | Kudos | Posted |
---|---|---|
1 | 05-17-2019 04:36 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|