Closed MesquiteGIS closed 9 years ago
@MesquiteGIS can you post what you've done? It will be easier to help if I can see your code.
Sure, thanks....
in the identify.js config I added:
define([ 'dojo/dom-construct', 'dijit/layout/TabContainer', 'dijit/layout/ContentPane', 'gis/CMV_Widgets/widgets/RelationshipTable/RelationshipTable'//path is relevant to wherever you placed the file ], function (domConstruct, TabContainer, ContentPane, RelationshipTable){
var formatters = {
relationship: function (relationship) {
return function (data) {
var container = new TabContainer({
style: 'width:100%;height:300px;'
}, domConstruct.create('div'));
container.startup();
//delay then resize
setTimeout(function () {
container.resize();
}, 200);
container.addChild(new RelationshipTable(lang.mixin({
attributes: data.attributes,
title: 'Related Records',
style: 'width:100%;'
}, relationship)));
return container.domNode;
};
}
};
.....and then in the gis\dijit\Identify.js file I added/ modified:
getInfoTemplate: function (layer, layerId, result) { var popup = null,
content = null;
if (result) {
layerId = result.layerId;
} else if (layerId === null) {
layerId = layer.layerId;
}
// see if we have a Popup config defined for this layer
if (this.identifies.hasOwnProperty(layer.id)) {
if (this.identifies[layer.id].hasOwnProperty(layerId)) {
popup = this.identifies[layer.id][layerId];
if (popup) {
if (typeof (popup.declaredClass) !== 'string') { // has it been created already?
if (popup.content) {
Also, just out of curiosity, how do i get my code to show up as code in these posts? Always hit or miss. Sorry, noob question.
That's a good question. Just put three of those dashes that look like apostrophe's in a row, and three more to end it. Its the key below the Esc button::` See here
So I found a slight problem, the docs I had didn't include dojo/_base/lang
. After adding that I was able to get the widget to work. A proxy is required, are you using a esri proxy??
Hi Gregg,
My application works using the related records widget, however, the table doesn't always populate. Sometimes it takes several clicks on a feature for the related records to show up for that feature. Have you experienced this at all? Could it be that my proxy is not configured properly, or would the widget not work at all if it was due to the proxy?
Thanks,
Ryan
On Mon, Jul 27, 2015 at 6:29 PM, Gregg Roemhildt notifications@github.com wrote:
So I found a slight problem, the docs I had didn't include dojo/_base/lang. After adding that I was able to get the widget to work. A proxy is required, are you using a esri proxy https://developers.arcgis.com/javascript/jshelp/ags_proxy.html??
— Reply to this email directly or view it on GitHub https://github.com/roemhildtg/CMV_Widgets/issues/16#issuecomment-125400941 .
Ryan Kammerer, GISP GIS/Programmer Analyst II City of Mesquite, Nevada (702) 346-8647 Ext. 4
Confidentiality Statement:
The information contained in this electronic mail is confidential information. This information may be attorney/client privileged and is intended only for the use of the individual or entity named above.
If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution, copying, or re-transmission of this message is in violation of 18 U.S.C. 2511(1) of the ECPA and is strictly prohibited. If you have received the message in error, please notify the sender immediately. Thank you.
It could be a proxy config problem. It would be difficult for me to say though. If you open up chrome or firebug network debugger and compare the results of a failed identify and successful one does anything stand out?
@MesquiteGIS were you able to get this figured out?
@roemhildtg , Hi Gregg, thanks for checking up on this. Sorry, took me awhile to get back to this project. I still haven't got the related tables widget to work 100% for my application.
http://mesquitenvpavement.appspot.com/
As you can see, when clicking on a new street segment, the identify widget works every time, but the related table doesn't show new records every time. Cant seem time figure out why. If i go back and forth, I'm eventually able to get the related table to populate.
Any suggestions?
Thanks
Its an odd issue. I actually experienced this occasionally before I switched over to putting the table in the identify popup.
Here's a couple things you can try, let me know if they help at all.
@roemhildtg Success!!! Your second suggestion of making the line width a lot wider worked! It never occurred to me to try that. Thank you so much for the suggestion. I think originally the width of that feature layer was set at .4, so I upped it up to 10 with no color and it now works beautifully.
Thanks again, much appreciated
I've been trying to get the related table widget to work within the identify info window with out any luck. I've updated to the latest version, and tried adding in the suggested code. Doing this disables the identify pop up all together. Any suggestions?