POST
|
Thanks Robert!! I had tried putting it in that function but got an error so I took it out. Come find out that it was as simple as adding layer. to the rxquery statement Thanks for all your help!! Hopefully I wont have any problems setting up the other buttons!! On Fri, Oct 31, 2014 at 4:21 PM, Robert Scheitlin, GISP <geonet@esri.com>
... View more
10-31-2014
02:17 PM
|
0
|
0
|
1204
|
POST
|
Robert, Thank you for the sample code!! I have made major progress but having an issue where the info from the related table is being displayed in the side panel when you click on the button instead of the country (line 130 function onEachFeature). It should only be displayed when you click on the country Any idea what I am doing wrong?? Chris On Wed, Oct 29, 2014 at 3:18 PM, Robert Scheitlin, GISP <geonet@esri.com>
... View more
10-31-2014
07:28 AM
|
0
|
7
|
1204
|
POST
|
Robert, Thanks for the assist!! I'll let know if I have any questions
... View more
10-29-2014
10:56 AM
|
0
|
9
|
1204
|
POST
|
Robert, I did get the updated plugin from github!! and thankr for showing me how to get the countries based on the button clicked on. I have been playing with it so I can understand what you did. The next question I have is: How do I add the results of rquery.run(error, response,raw ) to my map (i,e display the countries to my map). Do I wrap the queries like so: countries = new L.esri.featureLayer(featureURL, { query statements and execution goes here }.addTo(map) See the file relatedtab3.html attached to the original post Thanks
... View more
10-28-2014
12:15 PM
|
0
|
11
|
4892
|
POST
|
Robert, It's a recently created esri-leaflet plugin https://github.com/jgravois/esri-leaflet-related
... View more
10-27-2014
04:41 AM
|
0
|
2
|
829
|
POST
|
I'm trying to rewrite my esri-leaflet app to use the related tables plugin. (see attached) I'm trying to query the table by clicking on a button (upper left above the map).
... View more
10-26-2014
01:30 PM
|
0
|
6
|
2605
|
POST
|
Robert, Thanks for the simple solution to clicking on the country. Now I want to query the related table. I created a function tableRecords() that is called when you click on a country. I know that I have to use the objectid to find all the records in the related table. How do I write the query to find the records and display the results in the side panel div function tableRecords(evt) { console.log(evt.graphic.attributes); //alert(evt.graphic.attributes.OBJECTID); var relatedQ = new esri.tasks.RelationshipQuery(); relatedQ.outFields = ["*"]; relatedQ.relationshipId = 0; relatedQ.objectIds = [evt.graphic.attributes.OBJECTID]; relatedTable.queryRelatedFeatures(relatedQ, function(relatedRecords) { var tableObjId = relatedRecords[evt.graphic.attributes.OBJECTID]; console.log(tableObjId); }); } //end tableRecords see attached
... View more
10-23-2014
08:08 PM
|
0
|
0
|
302
|
POST
|
I did not explain what I want clearly. Here is a scenario: I click on the project map button and the country USA is highlighted. I want to click on the USA which will in turn triggers a query of the related table (tableURL) In my script I have a function (countries()) that executes a queryTask and a map.graphics.add(graphic) that adds the highlighted countries layer. So next I use either map.on("click", myClickHandler) or dojo.connect(map, "onClick", myClickHandler); with a function myClickHandler(){ query of related table goes here } My question: How do I tell it which country I clicked on and execute the relatedQuery? ---------------------------------------------------------------------------------------------------------------------------------- Solution to the typeError: Make sure the order of the items in the require array matches the items in the associated function require([ "esri/map", "esri/tasks/query", "esri/layers/FeatureLayer", "esri/tasks/QueryTask", "esri/tasks/RelationshipQuery", "dojo/domReady!" ], function(Map,Query, FeatureLayer, QueryTask, RelationshipQuery)
... View more
10-23-2014
06:06 AM
|
0
|
0
|
302
|
POST
|
Mathew, et al I tried redoing my code similar to what attaching but have encountered errors. So I am back to my original code and was able to solve the TypeError. Now for the last part..... I need to be able to click on the countries highlighted (based on the button clicked). Clicking on a highlighted country, triggers a query of the related table (tableURL) and the results of the query are displayed in the side panel on the right. Can you or someone show me how I can add an onclick event and a relatedquery to my script? Hope what I want makes sense
... View more
10-22-2014
09:20 PM
|
0
|
5
|
643
|
POST
|
Mathew, Thanks for the quick code review and the assist. I agree my code is rather crude and inefficient. My original plan was to use esri-leaflet api but it could not handle related tables. This api is new to me and at the moment I need to get a working version asap. Once it done, I do plan to figure how everything works while I clean up the code. Will review what you sent and let you know if I have any questions Chris
... View more
10-21-2014
12:06 PM
|
0
|
7
|
643
|
POST
|
I am using ESRI's javascript API so I think I need someone from ESRI to look at it Correct??
... View more
10-18-2014
05:39 AM
|
0
|
1
|
643
|
Title | Kudos | Posted |
---|---|---|
1 | 08-25-2015 09:37 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|