POST
|
Hi all, I have noticed an issue where if you have more tabs than the width of the Panel, the CSS of the TabContainer goes a bit crazy. Below is an image of where more tabs are present than the actual width of the panel. If i were to have only 4 tabs, then the CSS issue is not present. Tested in Chrome. Maybe i am missing an option / parameter somewhere. Any help much appreciated.
... View more
07-08-2015
08:23 AM
|
0
|
0
|
2707
|
POST
|
Hi Olivia, The code I sent you works for me (I am using County and region polygon data in my case). However, i see from the code you pasted, you have an erraneous console.log() in your query 2 call back function - just remove this. That should do it. Also, if you are looking to add the polygon to the map, I recommend adding the graphics to a graphics layer, then adding the graphics layer to the map. Early in your showResults function you are trying to add graphics directly to the map graphics object - this wont work. Steve
... View more
07-07-2015
06:42 AM
|
1
|
1
|
694
|
POST
|
OK I think what is happening, is that the results are being put into the div before the seconds query has finished executing (JS is asynchronous). Replace your callback function for the query2 execute with this one: queryTask2.execute(query2, function (results2) { for (var j = 0; j < results2.features.length; j++) { resultItems.push("<b>Local Authority:</b> " + results2.features .attributes.NAME + "<br>"); } dom.byId("info").innerHTML = resultItems.join(""); }); Also noticed in the console, there is an exception being thrown, but cannot see what line that is happening.
... View more
07-07-2015
04:59 AM
|
1
|
3
|
694
|
POST
|
Hi Olivia, Robert's code should work. Can you try this, on the line directly after dom.byId("info").innerHTML = resultItems.join(""); Add the following line: console.log(resultItems); On the line in your query2 execute callback function,before the FOR loop, add: console.log(results2); Then, using chrome or IE, press F12, go to console and look through the Object that has been logged.
... View more
07-07-2015
03:48 AM
|
1
|
5
|
694
|
POST
|
It doesn't look like you are executing your second query task
... View more
07-06-2015
08:50 AM
|
1
|
0
|
888
|
POST
|
You can do this in the code, your second query at the end of your first showResults function. But the simpler option is if you have access to the data, then to modify your feature classes to hold that information as an attribute of the polygon, then republish your map service. That will provide you better performance, and reliability then executing dependant query Tasks. What ever approach you take, you should ensure that the postcode area (polygon) you are retrieving, is fully contained within the local authority area (polygon) you are querying. Are you UK based? Just guessing from your terminology this is a possibility - there is a free data product from OS called codepoint that has postcode unit points which could return you a safer results than postcode polygon.
... View more
07-06-2015
08:30 AM
|
1
|
9
|
694
|
POST
|
Hi Everyone, We are looking for a way, where a user will click on a point on the map (we are only dealing with points, not polygons or lines), the popup opens, and instead of automatically closing when they select another point, it stays open until the user manually closes the popups. Many Thanks, Steve
... View more
07-06-2015
04:33 AM
|
0
|
2
|
2068
|
Title | Kudos | Posted |
---|---|---|
1 | 07-06-2015 08:30 AM | |
1 | 07-06-2015 08:50 AM | |
1 | 07-07-2015 03:48 AM | |
1 | 07-07-2015 04:59 AM | |
1 | 07-07-2015 06:42 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|