The ArcGIS API for JavaScript version 4.0 was released today. See the blog for a good overview, then head over to the developers site for details
I tried These methods with no sucsses- probbely because of wrong sintaks or wrong posation location.
it will cause a big halp if you will add to the srorce below :
JS Bin - Collaborative JavaScript Debugging
1.control the size and position of the popup info window .
2.hide the popup window.
3.close the popup window
Yoav,
To hide the popup, simply call the close method as documented here - Popup | API Reference | ArcGIS API for JavaScript 4.0
view.popup.close();
You can also simply set the the `visible` property to false.
view.popup.visible = false;
The popup's position can be controlled a number of ways depending on how you're using the popup. If you are passing features to a popup, the geometry will be used to position it (if available). Otherwise, the `location` property of the popup is used. The documentation for popup - Popup | API Reference | ArcGIS API for JavaScript 4.0 discusses these properties (features and location) and methods for working with the popup.
A popup's size can be altered with CSS.
If this didn't answer your question, then please add more specifics as to what you're looking for.
very Annoying uncontrolled Default popup.
Impossible to control the popup size and position
And no command to hide the popup
Oh there it is, thanks Bjorn - don't know how I missed that!
David Coley - Yes, see "Functionality matrix | ArcGIS API for JavaScript 4.0" for more details.
Hi Bjorn - I'm assuming the available widgets will increase as they are migrated? In particular, Directions, Print, Basemap Gallery, LayerList?
Thanks
David
As Bjorn stated in the preceding comment, redraw() will not be needed. The redraw will be handled for you in both scenarios. Once you set a new renderer on a layer (layer.renderer = yourNewRenderer) the redraw will automatically happen. Same thing with the client side graphics.
Tyrone Biggums - if you reset the renderer on the layer, the redraw() is not needed in 4.x.
Bjorn Svensson The first use I found in my apps is much like Tyrone's. I have an app where the users can alter the default symbology for a feature layer (fill color, outline color & thickness) and the redraw method is called after the user has made their alterations.
I have another application that has a feature layer that is created client side and updated with new content from a service every 10 minutes. This is done by applying a new feature collection to the layer. After the feature collection is updated (layer.applyEdits), I call redraw. Maybe in this case, redraw isn't needed; I dunno.
I'd like to step in with my use case since I'm wondering the same thing.
We have a FL drawn on the map. The user has the option to view the symbols in that FL (in a list box). The user has the ability to select a symbol, from a list, within a FL and select a new symbol. When the user selects a new symbol and submits, the FL is updated.
In 3.x, the way we accomplish this is with layer.redraw().
Steve Cole - the goal is that the FeatureLayer should be smart enough to redraw when needed. Could you explain in more detail your use cases for when you think the old redraw() functionality would still be needed in 4.x?
featureLayer.redraw() was removed and ESRI has no plans to add it to v4.0. What's ESRI's recommendation if you need this functionality moving forward?
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.