-
-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removing infoTemplate on setMapClickMode #902
Comments
There may be an issue identified here when the defaultMapClickMode is set to an empty string. I suspect that isn't a common scenario - at least not one that I recall having been discussed here in the last 5+ years. Regarding this statement,
If the Feature Layer infoTemplates were always available, they would interfere with widgets such as Drawing/Editing tools - The infoWindow popping up unexpectedly when attempting to draw or edit a feature is disruptive. Draw and Edit are just examples. There are many contributed tools that interact with the map in a similar fashion that would be affected by this change in behavior. Over the years, there have been many "challenges" identified in the approach taken by Esri within the 3.x API with regards to interacting with graphics on top of the map.This includes features from a Feature layer. CMV has addressed this in a specific way that has worked for many years with few compromises in functionality. Esri revisited and improved this approach in the 4.x API and is investing close to zero time in the 3.x API. As we move forward with working with the 4.x API, I highly doubt the CMV team will be re-examining how we interact with the 3.x API. |
Completely agree with the 'challenges' of working with graphics in 3.x and regarding the time invested in 3.x functionality vs moving forward with 4.x. Regarding defaultMapClickMode -- it can often lead to poor UX (at least in my client's scenario) when panning around the map and accidental left-click events will register an identify popup with no results, or generally unwanted identify popups. setInfoWindowOnClick is what I use to toggle the default graphic popup behavior that might interfere in custom widgets (or Draw, Edit, Measurement, etc.). I can see the issue with modifying all the community widgets to use the above method, but it may be possible to use that method in Identify, rather than removing the infoTemplate ? Not sure. |
How often can you reproduce it?
Description:
When there is no defaultMapClickMode for the app and setting mapClickMode to anything other than 'identify', the Identify widget will remove the infoTemplate property from all graphicsLayers in the setMapClickMode method. This creates side-effects in widgets that may use the infoTemplate property.
Steps to reproduce:
defaultMapClickMode: ''
in config to remove the default 'identify' mapClickMode (i.e. left-clicking the map will NOT execute identify)topic.publish('mapClickMode/setCurrent', 'draw')
topic.publish('mapClickMode/setDefault')
Expected results:
InfoTemplates that are set on Feature Layers should always be available and not removed
Actual results:
All infoTemplates are removed from all FeatureLayers on the map
Environment:
The text was updated successfully, but these errors were encountered: