POST
|
Anthony, thanks - I had considered doing that (using layers); the ESRI/Flex demo code showed how to do on/off toggling using layers. I have seen layers used for shapes, but not so much for mappoints, but I guess that's possible? I will give using layers a shot! Thanks, Tom
... View more
01-29-2014
03:58 AM
|
0
|
0
|
273
|
POST
|
Hi, I am stumped about how to turn on and off a set of mappoints that meet a certain criteria indicated in MXML checkbox choices. In my application, I want to be able to show facilities of a particular size (Large, Medium, Small). When a user clicks "Large" on the checkbox, only facilities identified as Large appear as mapoints; the same would be true for Medium and Small. When the user unclicks "Large" those facilities (and their associated mappoints) are cleared. So far, in the code below, I can get a large red square to appear when the user clicks the "Large" checkbox; however, when the user unclicks "Large" that red square persists. I know the code is running to the "else" condition because I have a trace set up that appears when I debug. I suspect it has something to do with "wmp2_Q1" which is a WebMercatorMapPoint, but I can't figure out how to remove it. Thanks for any help/guidance! protected function checkbox1_clickHandler(event:MouseEvent):void
{
if (Q1_cb.selected) {
var employees_from_facility_Q1: Array = from_query.filter(set_population);
for (var i:uint = 0; i < employees_from_facility_Q1.length; ++i){
var myGraphicMarker_Q1: Graphic = new Graphic(new WebMercatorMapPoint(employees_from_facility_Q1.facility_lon, employees_from_facility_Q1.facility_lat), new SimpleMarkerSymbol(SimpleMarkerSymbol.STYLE_SQUARE, 30, 0xFF3333, 0.5));
var wmp2_Q1: WebMercatorMapPoint = new WebMercatorMapPoint(employees_from_facility_Q1.facility_lon, employees_from_facility_Q1.facility_lat);
myGraphicsLayer.add(myGraphicMarker_Q1);
myMap.centerAt(wmp2_Q1);
myGraphicsLayer.refresh(); }}
else {
myGraphicsLayer.remove(myGraphicMarker_Q1);
trace ("selected false");
myGraphicsLayer.refresh();}}
private function set_population(element:*, index:int, arr:Array): Boolean{
return (element.employees_per_facility > markerQ2);}
... View more
01-28-2014
04:30 PM
|
0
|
4
|
656
|
POST
|
Works from my work computer - will try again at home tonight. Thanks, Tom
... View more
01-27-2014
07:10 AM
|
0
|
0
|
1144
|
POST
|
No luck, connection was reset by the server. Will try again on a different computer but my Internet seems to be ok. Thanks! Tom
... View more
01-27-2014
06:17 AM
|
0
|
0
|
1144
|
POST
|
Hi Robert, thanks - I was afraid of that, not enough info. 😞 How do I check my endpoints? Hope all's well, Tom
... View more
01-27-2014
05:58 AM
|
0
|
0
|
1144
|
POST
|
Hi, my map won't load this morning - worked fine last night. I get a status message "Error Connection reset" in the network monitor of Flash Builder debug, along with an Id string. Anyone else having a similar problem? Is it ESRI or something with my application? Thanks! [ATTACH=CONFIG]30887[/ATTACH]
... View more
01-27-2014
05:48 AM
|
0
|
5
|
4488
|
POST
|
Hi, I am looking for a terrain map of Europe without any labels or highways - just the terrain. Is such a map available? Thanks, Tom
... View more
03-09-2013
08:57 AM
|
0
|
2
|
6536
|
POST
|
Hi Robert, I did look at the buffer sample but am still stumped. I am not sure what the 'polylines' refer to in the buffer.geometries lines, I suspect these are important but not sure how to use them to drive a circle with a radius that comes from a variable I set. Thanks, Tom
... View more
01-21-2013
04:59 AM
|
0
|
0
|
535
|
POST
|
Hi, I would like some help understanding how to draw a circle showing the perceived radius of an earthquake (from a value held in my database) with the epicenter at the center of the circle. For example, an earthquake with a magnitude of 4.6 could have a perceived radius of 50+ miles. I would like to show that radius as a colored circle with no fill, if that makes sense. Thanks, Tom
... View more
01-18-2013
04:25 PM
|
0
|
5
|
6299
|
POST
|
Robert, Just to close the loop on this issue, I used the function call: var timeoutExample:uint = setTimeout( function():void{ myMap.zoom(1 / 16, wmp); }, 1000 ); instead of just myMap.zoom(1 / 16, wmp); and now it works! Thanks for your help, Tom
... View more
01-18-2013
03:38 PM
|
0
|
0
|
209
|
POST
|
Progress! That works, Robert - thank you. My map now appears centered and zoomed to the map point, with the map marker visible. But, I still get that ding-dang null error message! The only thing that looks odd to me is a reference to a variable called "mapX" with a value of 1.1217475844103828E7; I don't decalre a 'mapX" variable in my code, and have no clue what that value represents. Tom
... View more
01-18-2013
05:16 AM
|
0
|
0
|
209
|
POST
|
Interesting - when I click through the error message, I do get a zoomed in map, but always to the same location (the southern part of the US). If I pull back, I do see my selected marker. So the zoom is working, but its just not zooming to the right location (the point I select).
... View more
01-18-2013
04:59 AM
|
0
|
0
|
209
|
POST
|
Hi Robert, thanks - I did try WebMercatorMapPoint and got the same error. I also ran a break at the myMap.zoom and it looked like all the data that's supposed to be there is, although maybe I need to look for a specific item in my FlashBuilder debugger? This is how I am referencing 'myMap' - not sure if that has a bearing or not: <esri:Map id = "myMap" extent="{initialExtent}" wrapAround180="false" x="52" y="209" width="383" height="221"> <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/> <esri:GraphicsLayer id="myGraphicsLayer"/> </esri:Map> Tom
... View more
01-18-2013
04:22 AM
|
0
|
0
|
209
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|