-
-
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
changing default info window #212
Comments
For field labels use the field names alias in your database. |
As @friendde mentioned, the field aliases are returned from the IdentifyTask. There are examples within the |
Thanks for both of your replies. I'm having trouble with using identify on one layer because it is a dynamic service. Just doesnt get recognized through the identify widget. I've since read tmcgee post concerning this issue, and I'll try again as a feature service. Thanks! |
Dynamic LAyers work fine. Are you setting an id on the layer then have a corresponding key in the identify config? Post code. |
As David suggested verify your config\identify.js file. Here is my example, layerid comes from your rest end point. www: {
2: {
title: 'Hydrant w/ Fireflow',
fieldInfos: [{
fieldName: 'FacilityID',
label: 'number',
visible: true
}, {
fieldName: 'Hydrant ID',
visible: true
}, {
fieldName: 'Horizontal Data Source',
visible: true
}]
},
3: {
title: 'Hydrant',
fieldInfos: [{
fieldName: 'FacilityID',
label: 'Number',
visible: true
}, {
fieldName: 'INSTALLDATE',
visible: true
}, {
fieldName: 'Hydrant ID',
visible: true
}, {
fieldName: 'OWNER',
visible: true
}, {
fieldName: 'HORIZONTAL DATA SOURCE',
visible: true
}, {
fieldName: 'HYDRANT ID SOURCE',
visible: true
}, {
fieldName: 'FIRE FLOW',
visible: true
}]
}, |
Also here's a bit of an example on customizing things a bit
Here's what the popup looks like for the Active Well Hope that helps you a bit. |
thanks @rogers259 Nice example. To add to the discussion, when building the Here's a quick little example: 2: {
title: 'Sign Programs',
description: [
'<table class="attrTable">',
'<tr valign="top">',
'<td class="attrName">Program:</td>',
'<td class="attrValue">{SPROGRAMNA}</td>',
'</tr>',
'<tr valign="top">',
'<td class="attrName">Document:</td>',
'<td class="attrValue"><a href="http://server/SignPrograms/documents/{SPDOCUMENT}.pdf" target="_blank">{SPDOCUMENT}</a></td>',
'</tr>',
'<tr valign="top">',
'<td class="attrName">Image:</td>',
'<td class="attrValue"><a href="http:/server/SignPrograms/images/{IMAGE}.pdf" target="_blank">{IMAGE}</a></td>',
'</tr>',
'<tr valign="top">',
'<td class="attrName">Historic District:</td>',
'<td class="attrValue">{HCDZONES}</td>',
'</tr>',
'</table>'
].join('')
}, As an aside, if you do not create a configuration for your layer(s) in the |
These suggestions and tips helped a lot. Thanks! I found the layer I was trying to identify wouldn't do so because it was set to not display until a certain extent. Once I opened this up to always display, it was able to identify. Thanks again! |
On a side question to this.Is there a way to disable the default info window from coming up all together. I'm using an address point layer which I only want to appear once zoomed in to a certain extent. To get to identify function to work on this layer, I had to add two separate map services. One where the address point is open to all extents, but with no visible symbology, and another with the symbology and display settings how I want them. I would like to disable the default info window for the later service. Thanks |
Figured out a work around for my last comment. The default pop up window can be disabled by commenting out a section of code in the js/gis/dijit.identify.js file. Approximately lines 246-295. thanks |
@MesquiteGIS, if add the following to your your operational layer, it will exclude that one layer from the Identify: identifyLayerInfos: {
exclude: true
} that's the preferred method leaving the cmv core widget untouched. We just pushed out release 1.30 minutes ago which adds some additional enhancements to the Identify widget. This includes an option |
Would both the above suggestions for disallowing popups to a specific layer be dependent on the latest version of CWV? |
I know that the first suggestion was available at release 1.2.0, perhaps before that. There is an example of using |
Can you have a pie chart within a table row or between an hr tag? |
Is it possible to change the title, field labels, and which fields are displayed in the default popup window? Cant seem to get anything to work.
Thanks!
The text was updated successfully, but these errors were encountered: