POST
|
Robert, So here is what I'm working with below. If I add say layer (1, 2) and then add the "sublayers: true" statement where you show it above it doesn't show up like I want it to, or how I imagine it to. I simply shows Layer 1, Layer 2 which can be toggled on or off. I want to show it as such: 2015 March Weekdays Weekdays On Weekdays Off I have tried adding layer 0 and then saying sublayers: true and that doesn't work out for me either. Thanks for taking the time to help me out.
... View more
08-03-2015
07:17 AM
|
0
|
1
|
343
|
POST
|
Here is what I'm trying to do with the Layer List. I have layers in my mxd that have sublayers upon sublayers. Here is an example shown below my question. So in my mxd I have a group layer, 2015 - March Ridership, which then has a sublayer (Weekdays, Saturdays, Sundays), all of which have another sublayer (Ons, Offs). Is there a way to utilize the layerList to do this? If not, how can I set it up to simply show one sublayer (see Ex. 2)? I have tried and tried with no luck. Ex. 1 2015 - March Ridership Weekdays Ons Offs Saturdays Ons Offs Sundays Ons Offs 2014 - September Ridership Weekdays Ons Offs Saturdays Ons Offs Sundays Ons Offs Ex. 2 2015 - March Weekdays Ons Off 2015 - March Saturdays Ons Offs 2015 - March Sundays Ons Offs Currently my widget looks like this as I can't seem to get the sublayer: true working: var ridershipWidget = new LayerList( { map: map, layers: [ { layer:mar15SaturdaysOff }, { layer:mar15SaturdaysOn }, { layer:mar15WeekdaysOff },{ layer:mar15WeekdaysOn } ] }, "ridershipList" ); ridershipWidget.startup();
... View more
07-30-2015
04:03 PM
|
0
|
3
|
3385
|
POST
|
Yes I'm on 3.13. I'll jump back to 3.12 for this one and see what magic I can make happen. Thanks for the link. ** Update: Yeah, went back to 3.12 and what do you know, Labels **
... View more
06-29-2015
03:39 PM
|
1
|
1
|
478
|
POST
|
I currently have a Polyline featureLayer that I'm trying to label. This is what I have so far. I'm thinking after doing quite a bit of reading I need to find the center of the line and label it there. I'm not sure so I'm reaching out. // Label Roadway Projects
var friRoadwayColor = new Color("#000");
var friRoadwayLabel = new TextSymbol().setColor(friRoadwayColor);
friRoadwayLabel.font.setSize("13pt");
friRoadwayLabel.font.setWeight(Font.WEIGHT_BOLD);
friRoadwayLabel.font.setFamily("Calibri");
friRoadwayLabel.font.setDecoration("underline");
friRoadwayLabel.font.setStyle(Font.STYLE_ITALIC);
var friRoadwayLabelRenderer = new SimpleRenderer(friRoadwayLabel);
var friRoadwaylabels = new LabelLayer({
id: "friRoadwaylabels" });
friRoadwaylabels.addFeatureLayer(friRoadway, friRoadwayLabelRenderer, "{NAME}");
map.addLayer(friRoadwaylabels);
... View more
06-29-2015
03:32 PM
|
0
|
3
|
3722
|
POST
|
Robert, As always, you come through. I had a feeling this was what I had to do and even tried putting in the removeLayer but couldn't quite get it. Thank you so much, John Ritsko
... View more
06-02-2015
08:51 PM
|
0
|
0
|
296
|
POST
|
Scenario, I have a map which I'm trying to show Elected officials who reside over certain areas. I have 5 different groups (Congress, Senate, Commission, Assembly, and Ward). The first one you select with the checkbox works fine, labels good enough for what I need it to do. However, when you select the next Elected type it hides the previous one and then symbolizes the featureLayer correctly but just no text when I try to add it to the map. Any help with getting this working would be greatly appreciated. Here is the function that I call to do this text labeling: function labelElecteds(elc) { var electedColor = new Color("#000"); var electedLabel = new TextSymbol().setColor(electedColor); electedLabel.font.setSize("12pt"); electedLabel.font.setFamily("Calibri"); var electedLabelRenderer = new SimpleRenderer(electedLabel); var labels = new LabelLayer({ id: "labels"}); labels.addFeatureLayer(elc,electedLabelRenderer, "{NAME}"); map.addLayer(labels); }
... View more
06-02-2015
03:35 PM
|
0
|
2
|
3456
|
POST
|
Matt, What would I set the constructor to for the activeSourceIndex? (1?). I have my sources in the var sources array and I want to use the 1st one in there which is my own local address geocoder. I did manage to only show the services I want to search, thank you for that. Do I have create multiple sources? Your input is greatly appreciated. Also, when using my own geocoder and I type in an address I get the suggestions. From what I'm reading I can't get that unless my server is on 10.3. Am I correct in thinking that? If so is there another way to get address suggestions? Thanks again, John
... View more
04-27-2015
03:39 PM
|
0
|
1
|
889
|
POST
|
Matt, Thanks for the correction to "Single Line Input", that fixed it. Can I set one of the Sources to be my default? Going to work on the "Set Sources" next. Thanks so much, John
... View more
04-23-2015
11:23 AM
|
0
|
3
|
1315
|
POST
|
I have two things. First, can you point me to where I can see an example of how to use my own locator with the new dijit/Search. Below is what I use now with the geocoder and want to use this one. locatorUrl = ""; I tried this but no luck: sources.push({ locator: new Locator("), singleLineFieldName: "SingleLine", name: "Clark County Geocoding Service", localSearchOptions: { minScale: 300000, distance: 50000 }, placeholder: "Search Local Geocoder", maxResults: 3, maxSuggestions: 6, enableSuggestions: true, minCharacters: 0 }); Second, I do not want the default ESRI World Geocoder, is there a way to remove it as it causes issues when I try to search. Thanks, John
... View more
04-22-2015
01:50 PM
|
0
|
5
|
1315
|
POST
|
Tom, You nailed it. I was using just a selectedBusStop.clear() call thinking that was going to work, when in fact I needed to set the definition expression as well. It's all good now. Thanks, I knew I was missing something simple here. John
... View more
04-13-2015
06:55 AM
|
0
|
1
|
512
|
POST
|
Ok, here is my issue. I have a JavaScript application that I have written and the problem comes when I try to hit my home button. The application uses Feature Layers to show Bus Route and Bus Stops. If a user has selected a Bus Route on the left and zooms in you can see the highlighted route along with the now highlighted Bus Stops that are associated with this route. HOME BUTTON function starts my problems. Issue: If you are zoomed in enough to see the selected Bus Stops (Green dots) and hit the "HOME" button, only those selected Bus Stops that are visible will be removed and replaced with the Blue Dot Bus Stops. For some weird reason even if you are zoomed out it still doesn't clear all of the feature layer. I tried putting a timer on the zoomtoextent but that didn't help either. Anyway, here is my goHome function that may be causing issues. To replicate issue. Click on the first route 101 on the left. Zoom into the lowest portion of the route and you'll see the green selected Stops. Now hit the home button then zoom back into that area. Start going North (Up) and you'll see how there are still Selected Stops (Green Dots). Here is a link to the Application** Link removed as problem is solved ** Sorry tired to put this in a code block but it keeps showing up weird. // Resets the Map to its initial state with no routes selected and accordian pane back to default function goHome(){ // Reset the Accordian Content Panes and fix naming var newTitle = "Bus Arrival Times"; dijit.byId("pane3").set("title", newTitle); var container = dijit.byId("container"); container.selectChild("RTCBusroutes", true); // This will remove old values in Bus Arrival Time pane so Bus Arrival Times will clear var results = document.getElementById("results"); var rowCount = results.rows.length; for (var x=rowCount-1; x>0; x--) { results.deleteRow(x); } // Removes the Highlight from the currently selected Item in the RTC Bus Routes List pane $('.highlight').removeClass('highlight'); // Scrolls to the top of the List in the RTC Bus Routes Content Pane List $('#RTCBusroutes').scrollTop(0); // Remove Currently Selected Bus Routes and Ensure all Routes are showing selectedBusRoute.clear(); busRoutes.setDefinitionExpression("ROUTE IS NOT NULL"); // Remove Currently Selectes Bus Stops and Ensure all Stops are showing selectedBusStops.clear(); busStops.setDefinitionExpression("ROUTE IS NOT NULL"); // Removes Any simpleLineSymbols and Any simplePointSymbols map.graphics.clear(); // Closes any open infoWindows map.infoWindow.hide(); // Zoom to Map Extent map.setExtent(mapExtent); //setTimeout(function() {map.setExtent(mapExtent);}, 1000); // Clears any address entered into Address Search Box document.getElementById("search_input").value=""; }
... View more
04-09-2015
02:59 PM
|
0
|
3
|
3811
|
POST
|
Robert, No worries at all you have been beyond helpful. I've got to start a new discussion soon on a few other questions that I have that perhaps I'll be able to once again thank you. Thanks again for all the help, it's greatly appreciated. Have a great day.
... View more
03-19-2015
06:49 AM
|
0
|
0
|
659
|
POST
|
NEVERMIND, FIXED IT. Had to add the "dojo/_base/lang", lang as well. Duh!!!!!!!!!!!! Robert, Didn't want to bug you but I added this to my code and it's not working out for me, tried for most of the day now to figure it out with no luck. Also, when I added this I lost some functionality that I have with Layers that I have a checkbox associated with. I did add the "dojo/aspect", aspect as well. Also, the Measurement tool allows me to select all of the values and none of them actually work. // If user wants to see Paratransit Service Area this checks the checkbox to see if they turn it on or off document.getElementById("checkBox0").onclick = function() { if (this.checked) { paraSvcArea.show(); } else { paraSvcArea.hide(); } }; // If user wants to see Flexible Demand Response (FDR) Service Area this checks the checkbox to see if they turn it on or off document.getElementById("checkBox1").onclick = function() { if (this.checked) { fdrSvcArea.show(); } else { fdrSvcArea.hide(); } }; // If user wants to see Silverstar Routes this checks the checkbox to see if they turn it on or off document.getElementById("checkBox2").onclick = function() { if (this.checked) { silverstar.show(); } else { silverstar.hide(); } };
... View more
03-18-2015
02:21 PM
|
0
|
2
|
659
|
POST
|
Robert, Regarding the measurement widget. I simply have the following code below. I'm not sure where I would go about adding the code you supplied above. Again, thanks so much var measurement = new Measurement({ map: map }, dom.byId("measurementDiv")); measurement.startup();
... View more
03-18-2015
09:23 AM
|
0
|
4
|
659
|
POST
|
Robert, One: Perfect thank you. Two: I removed the on.mouse events as they are no longer needed, Thank you. Three: When I added this to my css it removed the RTC Bus Routes label portion and left the Application name: PROD_ADA_CERT instead. I'm not quite sure how to fix this as I only want the layer name (RTC Bus Routes). Is there a way for me to manually name it somehow? Also, is there a way to remove the (No Information Available) popup when the user clicks around on the map? I have the measurement tool added to this application and when a user is measuring distance to walk to a bus stop this popup (No Information Available) pops up every time they click on the map. Thank you again for the continued help. Your help is greatly appreciated.
... View more
03-18-2015
09:02 AM
|
0
|
6
|
659
|
Title | Kudos | Posted |
---|---|---|
1 | 06-29-2015 03:39 PM | |
1 | 08-17-2015 02:29 PM | |
2 | 08-19-2015 06:50 AM | |
1 | 02-17-2015 12:59 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|