Hi all,
I'm creating an app with 4.18 and have found that graphics, added to a graphics layer in the map, only appear after I manually zoom in on first creation. They are present in the layer if I log it to the console but not visible. If I zoom in, then they draw. I have tried changing the view extent after the creation but that does not refresh the graphics
I am creating the empty graphics layer when the map and mapview are first created and then adding graphics in subsequent processes. I need the graphics to be visible to the user when when they enter the application.
Any suggestions would be greatly appreciated.
Solved! Go to Solution.
That bug has been fixed for 4.19 which is releasing in early April. You can verify this by testing your app using the "next" build: https://github.com/Esri/feedback-js-api-next.
That bug has been fixed for 4.19 which is releasing in early April. You can verify this by testing your app using the "next" build: https://github.com/Esri/feedback-js-api-next.
Many thanks Andy for the prompt reply,
we are coding using the ES modules in angular - will that bug fix also apply?
@DaveAdams definitely, you can try it out by running: npm i @arcgis/core@next
Hi Andy, I know the fix is imminent but just wondered if you knew of any trick around this in the short-term? I have tried programmatically zooming the map afterwards and changing the visibility of the graphicslayer to see if those actions caused a refresh without a manual zoom requirement.
You might take a look at these issue comments for potential workaround: https://github.com/Esri/jsapi-resources/issues/268#issuecomment-781899119. I didn't test them out, so I can't vouch for them.
Many thanks Andy, I'll give it a try and post back the results (I like the name of the function)
Thank you - the workaround worked for me but I look forward to the imminent bug fix