Skip to content
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

Disable popups for no information #305

Closed
knozaki2001 opened this issue Nov 18, 2014 · 7 comments
Closed

Disable popups for no information #305

knozaki2001 opened this issue Nov 18, 2014 · 7 comments

Comments

@knozaki2001
Copy link

I wish I could disable popups "no information available" when there is nothing to identify.
I heard it is possible by modifying js/gis/dijit/Identify.js but it would be nice to be able to configure.

@wfunderberg
Copy link

Agreed as there are some layers that I would rather not show in the identify window. I know in the Identify.js file I could comment out:

        // if no Popup config found, create one with all attributes or layer fields
        if (!popup) {
            //popup = this.createInfoTemplate(layer, layerId, result);
        }

but it would be nice to add a property in the operationalLayers ("viewer.js") section to where i state if i wish to have it included in the Identify pop-up (such as identifiable: false)

Fantastic application!!!!!

@DavidSpriggs
Copy link
Member

@wfunderberg
Copy link

David,
That doesn't work with layers such as 'feature'.

{
type: 'feature',
url: 'http://server.com/arcgis/rest/services/public/Zoning_Map/MapServer/0',
title: 'City Limits',
options: {
id: 'citylimits',
opacity: 1.0,
visible: true,
outFields: ['*'],
mode: 0
},
identifyLayerInfos: { layerIds: [] },
editorLayerInfos: {
disableGeometryUpdate: true
}

@tmcgee
Copy link
Member

tmcgee commented Nov 21, 2014

Could this be configured using the visibleWhenEmpty property of the Popup? https://developers.arcgis.com/javascript/jsapi/popup-amd.html

You can always add your own Popup to the mapOptions in config/viewer. Perhaps we can look at adding some of that configuration to the identify widget that is passed on to the info window?

@wfunderberg
Copy link

Going to open a new thread as I believe my issue may be a tad different than what the original poster stated.

@green3g
Copy link
Member

green3g commented Mar 29, 2017

Solution:

define([
    'esri/units',
    'esri/geometry/Extent',
    'esri/config',
    /*'esri/urlUtils',*/
    'esri/tasks/GeometryService',
    'esri/layers/ImageParameters',
    'gis/plugins/Google',
    'dojo/i18n!./nls/main',
    'dojo/topic',
    'esri/dijit/Popup',
    'put-selector'
], function (units, Extent, esriConfig, /*urlUtils,*/ GeometryService, ImageParameters, GoogleMapsLoader, i18n, topic, Popup, put) {

//. ...........................

        mapOptions: {
            basemap: 'streets',
            center: [-96.59179687497497, 39.09596293629694],
            zoom: 5,
            sliderStyle: 'small',
            infoWindow: new Popup({visibleWhenEmpty: false}, put('div'))
        },

@green3g green3g closed this as completed Mar 29, 2017
@drusexton
Copy link

@roemhildtg I have implemented this into my app, but the behavior is causing the popup to disappear even if the popup contains data. Is this an error on my behalf, or with the fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants