POST
|
You could instantiate your excel logic in python using python dictionaries as the look-up lists... Or pre-calculate everything in excel and join it to your spatial layers.
... View more
07-26-2012
06:50 AM
|
0
|
0
|
1276
|
POST
|
jberg, From what I gather you are attempting to select a series of points from a layer and return them if they are contained by a polygon drawn by a user? I doubt the following logic will be the most elegant way but my approach would be as follows using points stored in a GraphicsLayer:
var polygon:Polygon = new Polygon(); //This would be the user's created polygon.
for(var i:int = 0; i<=graphicsLayer.numGraphics;i++){
if(!polygon.contains(MapPoint((graphicsLayer.graphicsProvider as Graphic).geometry)){
graphic.visible = false;
}else{
graphic.visible = true;
};
};
... View more
07-20-2012
05:21 AM
|
0
|
0
|
252
|
POST
|
David, Are you successfully getting your "Locations" data to load into an object? I assume you have a feature Layer with the field [Location] containing a link for each feature. When you select (e.g. RollOver, click, etc.) a feature you should get it (i.e. event.target ). This should be returned to you as a graphic although you may need to cast it to a graphic. In the event.target graphic, get the attributes (event.target).attributes. Then get the position of the [Location] attribute with something like "attributes[0]" or attributes["Location"]. This should return the link. Unfortunately I usually code in flex and only vaguely familiar with the javascript API (although esri tells me there web api's are all similar). So i have described a logic I would use. I apologize for not solving your issue!
... View more
07-20-2012
05:09 AM
|
0
|
0
|
492
|
POST
|
Let's see: I had in error in my earlier code (extra brackets).
var Att = {Location: "Location"}
function hideDiv() {
if (Att.Location.toString() == ''){ //if the Att object's location is cast to a string and is empty
document.getElementById("testdiv").style.visibility= 'hidden'; //hide the div
}else{ //if it is not an empty string
document.getElementById("testdiv").style.visibility='visible';//show the div
};
};
in your code:
Att.eLocation.toString()
"eLocation" is not a property of the Att object. Are you able to debug your JavaScript by using something like firebug plugin in firefox?
... View more
07-18-2012
02:36 PM
|
0
|
0
|
492
|
POST
|
Try using "while" loops as well. These are often faster than "for" loops. Also try using direct OS calls like os.listdir().
... View more
07-18-2012
05:34 AM
|
0
|
0
|
468
|
POST
|
Reading through some of the API, this may work:
var infoTemplate = new esri.InfoTemplate();
infoTemplate.setContent( '<b>Station:</b><a href="http://${Corner Point Identifier}.pdf">Descriptive Text</a>' );
If this is a valid path:
"http://${Corner Point Identifier}.pdf"
... View more
07-18-2012
05:12 AM
|
0
|
0
|
279
|
POST
|
David, Sorry-- misunderstood. So you would like to know if the location string (part of the URI) is empty? If you have the div:
<div id="testdiv">
<a href="{'http://000.000.000.000/flexviewers/app/'+Att.Location.toString()}" target=_blank>Location</a>
</div>
Then in javascript you'll use similar code as above, but add a check to the location: You will use the equality operator '=='.
var Att = {Location: "Location"}
function hideDiv() {
if (Att.Location.toString() == ''){ //if the Att object's location is cast to a string and is empty
document.getElementById("testdiv").style.visibility= 'hidden';} //hide the div
}else{ //if it is not an empty string
document.getElementById("testdiv").style.visibility='visible';}//show the div
};
}
Is this closer to what your asking?
... View more
07-18-2012
05:00 AM
|
0
|
0
|
492
|
POST
|
Have you tried casting it to a Layer and calling the refresh() method on it. This should reload the Layer.
... View more
07-17-2012
02:51 PM
|
0
|
0
|
124
|
POST
|
Maybe something like this? I think the Att variable is an object. You need to get the value of 'Location' out of the Att object. So your script would be something like: var Att = {Location: "Location"}
function hideDiv() {
if (Att = '') {document.getElementById("testdiv").style.visibility= 'hidden';}
}else{
document.getElementById("testdiv").style.visibility='visible';}
};
} Where you have the "testdiv" already added to the DOM somewhere. <div id="testdiv">
<a href="{'http://000.000.000.000/flexviewers/app/'+Att.Location.toString()}" target=_blank>Location</a>
</div>
... View more
07-17-2012
02:47 PM
|
0
|
0
|
492
|
POST
|
Nortonsig, I think you'll get a FeatureSet returned from a Query function. Iterate through the features using a "for" loop and extract the needed field values from the attributes into an array. Use this array to create your chart...
... View more
07-17-2012
01:08 PM
|
0
|
0
|
452
|
POST
|
Will coding the return into an anchor tag work? '<b>Station:</b><a href="http://'+ ${Corner Point Identifier}+'.pdf>Descriptive Text</a>"
... View more
07-17-2012
01:03 PM
|
0
|
0
|
279
|
POST
|
Is there a simple way to color the background of the Template Picker and Attribute Inspector pop-up in CSS?
... View more
07-17-2012
12:25 PM
|
0
|
0
|
553
|
POST
|
You can put the link in an html anchor tag (<a>) and add it to the htmltext attribute of a text tag (<mx:Text>). Put the text tag as a child in the infoWindow (map.infoWindow). Then call the show/hide methods on the infoWindow when the user interacts with a feature.
... View more
07-17-2012
12:20 PM
|
0
|
0
|
492
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|