POST
|
Robert, I do have a few other questions (3) about my complete code for this project and was wondering if you wouldn't mind a little further guidance. One: I have a home button command that I'm trying to get to clear out the results from the results div tag. Here is what I have that doesn't seem to work with this particular application. It gives me an error finding the (results.rows). Any ideas how to clear out this data? Here is my goHome.js // Resets the Map to its initial state with no routes selected and accordian pane back to default function goHome(){ // Acitivates the Legend Accordian Tab var container = dijit.byId("container"); container.selectChild("legendPane", true); // This will remove old values in Routes Within 1/4 Mile Div Tag var results = document.getElementById("results"); var rowCount = results.rows.length; for (var x=rowCount-1; x>0; x--) { results.deleteRow(x); } // Removes Any simpleLineSymbols and Any simplePointSymbols map.graphics.clear(); // Closes any open infoWindows map.infoWindow.hide(); // Zoom to Map Extent map.setExtent(mapExtent); // Clears any address entered into Address Search Box document.getElementById("search_input").value=""; } TWO: When creating my busRoutes layer, I don't want the map to allow users to click anywhere and it say (No Information). I also tried to use the on mouse-over for this layer and can't seem to get it to work. Any ideas on this one. // Creating the Template for Bus Route busRouteContent = ("Name", "<tr><td><a href='${TRAN_GD_PDF}' target='_blank'>${NAME}</a></tr></td>"); busRouteTemplate = new esri.InfoTemplate; busRouteTemplate.setContent(busRouteContent); busRouteTemplate.setTitle("Bus Route: ${ROUTE}"); busRoutes = new ArcGISDynamicMapServiceLayer("http://gis.rtcsnv.com/arcgis/rest/services/Maps/PROD_ADA_CERT/MapServer", {id:"Routes"}); busRoutes.setInfoTemplates({ 2: { infoTemplate: busRouteTemplate } }); busRoutes.setVisibleLayers([2]); busRoutes.on("mouse-over", function() { map.setMapCursor("pointer"); }); busRoutes.on("mouse-out", function() { map.setMapCursor("default"); }); THREE: In my Legend list this dynamic map service layers shows up using the application name and then its layer name. How can I remove the application part from the layer name. It currently shows up as: PROD_ADA_CERT RTC Bus Routes. I only want it to say RTC Bus Routes.
... View more
03-18-2015
07:56 AM
|
0
|
8
|
3986
|
POST
|
For some reason the routes just aren't highlighting red and the whole count and list of routes within the 1/4 Mile aren't showing up for me. I've updated the Fiddle site and doesn't work on their either. Thank you again for your patience and helping me with this, much appreciated. https://jsfiddle.net/vkk8qhof/17/
... View more
03-18-2015
06:26 AM
|
0
|
1
|
634
|
POST
|
Robert, Thank you so much for taking the time to help me out with this. I have plugged your code in on my end and for some reason the geocode address isn't returning the routes. Perhaps I'm missing something here. Thank you again for taking the time to help out. You've always been such a great help.
... View more
03-17-2015
04:04 PM
|
0
|
3
|
634
|
POST
|
It's working now. Give the fiddle a shot if you don't mind.
... View more
03-17-2015
02:53 PM
|
0
|
5
|
634
|
POST
|
I'm trying to get my application to accept a users address that hits our own geocoder and then zooms to said address, creates multiple buffer rings so our internal end users can see the distances from this address. Then I want to be able to select all routes within 1/4 Mile (1320 Feet) of this address point. ESRI has an example using the Draw tool and unfortunately that won't work for me. I've done my best to get their Draw tool and my geocode working but of course I need some direction on how to get the geocoded address going. With my geocoder creating a graphic as well as my buffers I'm not sure how to select routes using only the 1/4 mile buffer ring extent. Any ideas or directions for me to head will be greatly appreciated. Again, I need a user to be able to click on the layer and see information about it, but by not adding this layer as a feature layer I'm not sure how to go about that, then I need user to enter address, zoom to location and place a graphic and text of address, then create buffers, then select all Routes within 1/4 Mile Buffer Distance and display those Routes in the box provided along with the count of Routes. When you first run the fiddle application you can select the area you want and it works great with the Draw Tool, of course not my end goal, but it's something. I tried to get a circle going as well but can't seem to figure it out. Any input is greatly appreciated. A good local address is: 600 S Grand Central Pkwy if you wanted to test the geocoder to see what it does. I have attached a jsfiddle link to what I have now: https://jsfiddle.net/vkk8qhof/16/
... View more
03-17-2015
10:28 AM
|
0
|
7
|
4797
|
POST
|
I've read the API content for the esri/dijit/Geocoder and didn't see anything in regards to maxCharacters allowed for user input. Does anyone know how I can set this in my application? One of our network staff tossed in roughly a million characters into the search box and slowed the server to a crawl for a few seconds. Is there any way we can set a Max Characters sort of like the way there is a minCharacters property in the geocoder api? Thanks so much. Here is the code the way I have it now. // Creates the Geocoder using the RTC Streets Geocoder var myGeocoders = [{ url: locatorUrl, name: "LocateLocationByAddress", placeholder: "Search By Local Address" }]; var geocoder = new Geocoder({ map: map, autoComplete: true, arcgisGeocoder: false, geocoders: myGeocoders }, "search"); geocoder.startup(); var geoSymbol = new esri.symbol.SimpleMarkerSymbol(esri.symbol.SimpleMarkerSymbol.STYLE_CIRCLE, 18, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new Color([255, 153, 153, 0.5]), 8), new Color([255, 0, 0]) ); // Modify the symbol user to show geocoded location geocoder.on("select", function showLocation(evt){ var point = evt.result.feature.geometry; var graphic = new esri.Graphic(point, geoSymbol); map.graphics.add(graphic); });
... View more
02-17-2015
09:38 AM
|
0
|
4
|
2928
|
POST
|
Dear Sir, I solved the placement issue.the only problem which I am facing about skin and icon images of navigation control are not visible on the control.please guide me what can be the reason. Thanks. Nadir, Check these as well. There was also a visible="false" in one of these that I removed as well. Just saying this was something I had to change as well to get mine working. Navigation.mxml
<s:dataProvider>
<s:ArrayCollection>
<fx:Object action="pan"
imageIcon="com/esri/Navigation/assets/images/i_pan.png"
label="Pan"/>
<fx:Object action="zoomin"
imageIcon="com/esri/Navigation/assets/images/i_zoomin.png"
label="Zoom In"/>
<fx:Object action="zoomout"
imageIcon="com/esri/Navigation/assets/images/i_zoomout.png"
label="Zoom Out"/>
</s:ArrayCollection>
</s:dataProvider>
... View more
06-19-2014
06:13 AM
|
0
|
0
|
166
|
POST
|
So here is my question that I need help with. When a user clicks on a FeatureLayer of Bus Stops I have an infoWindowRenderer with a LabelDataRenderer that shows some information about the stop such as Stop Number, Stop Name, and which Route services that particular Stop. I can have multiple stops at the same point in space that have different Bus Routes that stop there. Currently when I click on it in debug version you can see the toggle arrows on top that allow you to move through the stops at that point. This is what it currently shows: [ATTACH=CONFIG]34715[/ATTACH] What I would like to do is figure out which stops are there and show the list of Routes as shown below: Bus Stop: 999 Stop Name: Horizon @ Boulder Routes Serviced: 101 102 103 etc. Each Stop has a different Route associated with it and I was looking and looking on how to try and create an array that I could them Here is what I currently have:
<esri:FeatureLayer id="busLayer" name="Stop on Transit Route"
mode="selection"
buttonMode="true"
outFields="[stopNumber, stopName, Route]"
url="xxxxxxxx">
<esri:infoWindowRenderer>
<fx:Component>
<esri:LabelDataRenderer label="Bus Stop">
<fx:Script>
<![CDATA[
import flash.sampler.NewObjectSample;
import mx.controls.Text;
protected function clickHandler(event:MouseEvent):void {
var busStopLink:String = "http://rtcws.rtcsnv.com/mobile/geoRoutes.cfm?bsid=";
var stopNumber:String = data.stopNumber;
var urlString:String = busStopLink + stopNumber;
var urlReq:URLRequest = new URLRequest(urlString);
navigateToURL(urlReq, "_blank"); }
]]>
</fx:Script>
<s:VGroup paddingBottom="5"
paddingLeft="5"
paddingRight="5"
paddingTop="5">
<s:Label text="Stop Number : {data.stopNumber}"
click="clickHandler(event)"
textDecoration="underline"
buttonMode="true"
toolTip="Click Here to Check Bus Location."/>
<s:Label text="Stop Name : {data.stopName}"/>
<s:Label text="Route Number: {data.Route}"/> // Not what I want....
// Array of ROUTE NUMBERS Would Go Here in One Window
// While (len of selected stops != 0) {
// "Route: " + array ?????
</s:VGroup>
</esri:LabelDataRenderer>
</fx:Component>
</esri:infoWindowRenderer>
</esri:FeatureLayer>
... View more
06-18-2014
02:57 PM
|
0
|
0
|
1124
|
POST
|
Sorry for delayed response. I managed to simply use the geometry of the graphic to zoom to the extent of. protected function routeList_changeHandler(event:IndexChangeEvent):void { mySelectedRouteLayer.clear(); var graphic:Graphic = List(event.currentTarget).selectedItem as Graphic; var selectedRoute:int = graphic.attributes["ROUTE"]; query_Selection.where = "ROUTE = " + selectedRoute + ""; mySelectedRouteLayer.selectFeatures(query_Selection, FeatureLayer.SELECTION_NEW); mySelectedRouteLayer.selectionColor = NaN; highlightStops(graphic); myMap.zoomTo(graphic.geometry.extent); }
... View more
06-16-2014
08:16 AM
|
0
|
0
|
394
|
POST
|
I have a creationComplete function and I tried what you said but I personally couldn't get it working. I've taken one 2 day course on Flex so I'm still very new to this.
protected function doQuery():void
{
queryTask.execute(query, new AsyncResponder(onResult, onFault));
function onResult(featureSet:FeatureSet, token:Object = null):void
{
routeList.dataProvider = new ArrayCollection(featureSet.features);
}
function onFault(info:Object, token:Object = null):void
{
Alert.show( info.toString() );
}
}
<s:List id="routeList"
x="10" y="10"
width="225" height="575"
rollOverColor="#CCCCCC"
horizontalScrollPolicy="on"
creationComplete="doQuery()"
change="routeList_changeHandler(event)">
... View more
06-05-2014
02:30 PM
|
0
|
0
|
394
|
POST
|
Robert, I can't put the GraphicUtil in the creationComplete function as it stores the extent of all my routes which is run only once when the program loads. As such, it zooms to all of the routes only once and then never moves from there. The creationComplete function stores the geometry of my routes as routeList.dataProvider=new ArrayCollection(featureSet.features); I use a change event based on this routeList to get an attribute from the list in order to query stops and routes. Perhaps you can help me think about how to address this. Thanks.
protected function routeList_changeHandler(event:IndexChangeEvent):void
{
mySelectedRouteLayer.clear();
var graphic:Graphic = List(event.currentTarget).selectedItem as Graphic;
var selectedRoute:int = graphic.attributes["ROUTE"];
query_Selection.where = "ROUTE = " + selectedRoute + "";
mySelectedRouteLayer.selectFeatures(query_Selection, FeatureLayer.SELECTION_NEW);
mySelectedRouteLayer.selectionColor = NaN;
highlightStops(graphic);
/* var routeExtent:Extent = GraphicUtil.getGraphicsExtent(graphic.toArray()); */
/* myMap.extent = routeExtent; */
var ac:ArrayCollection = mySelectedRouteLayer.graphicProvider as ArrayCollection;
myMap.zoomTo(GraphicUtil.getGraphicsExtent(ac.toArray()));
}
... View more
06-05-2014
01:52 PM
|
0
|
0
|
394
|
POST
|
Robert, Thanks, I'm going to try and get that working. I'll keep you posted and thanks for the input, much, much appreciated. John, If you follow my advice on getting the features array from the AsyncToken in the selectionComplete function (and not the graphicsPrivider) than you should be ok.
... View more
06-05-2014
10:28 AM
|
0
|
0
|
394
|
POST
|
Robert, I tried something like that using this code below but it seems to zoom to all the features progressively as you keep selecting more of them. So the first time you run the application and select a route it doesn't move at all. Then once you select the next feature it seems to zoom to the extent of the two routes.
var ac:ArrayCollection = mySelectedRouteLayer.graphicProvider as ArrayCollection;
myMap.zoomTo(GraphicUtil.getGraphicsExtent( ac.toArray()) );
John, In your selectionComplete function you use the AsyncToken that is returned and get the features array and feed that array to a GraphicUtil object and call the getGraphicsExtent method to get a extent and then you feed that to the myMap.zoomTo.
... View more
06-05-2014
10:20 AM
|
0
|
0
|
394
|
POST
|
Greetings all, For some reason I'm having a bit of difficulty getting my zoom to feature layer work. The following clears the previously selected route (mySelectedRouteLayer) then utilizing the route they selected returns the "ROUTE" number I use to create a SELECTION_NEW from the Feature Layer and display that layer. It will clear the feature layer when they select the next one my problem is that I can't seem to figure out how to zoom to this particularly selected feature. I was using the myMap.zoomTo(graphic.geometry); but since I no longer use the Graphic Layer I'm not sure how to get the geometry out of my FeatureLayer to zoomTo it. Your input is greatly appreciated. Thank you in advance. mySelectedRouteLayer.clear(); var graphic:Graphic; graphic = List(event.currentTarget).selectedItem as Graphic; var selectedRoute:int = graphic.attributes["ROUTE"]; query_Selection.where = "ROUTE = " + selectedRoute + ""; mySelectedRouteLayer.selectFeatures(query_Selection, FeatureLayer.SELECTION_NEW); mySelectedRouteLayer.selectionColor = NaN; // Zoomto the Extent of mySelectedRouteLayer
... View more
06-05-2014
10:09 AM
|
0
|
9
|
950
|
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
|