POST
|
Thanks so much. That got me what I was looking for. I didn't event realize that the parent attribute existed.
... View more
11-01-2010
01:42 PM
|
0
|
0
|
600
|
POST
|
David, It actually has more to do with the PictureMarkerSymbol than the UniqueValueRenderer. The way to avoid this is to set mouseChildren = "false". Thanks for your quick reply! I was actually looking at the mouseChildren attribute. Symbols don't seem to have a mouseChildren attribute, and the graphicAdd event never seems to be triggered, so I can't set it for the Graphic. Do you mean that I should set mouseChildren=false for the GraphicsLayer? Thanks again!
... View more
11-01-2010
01:28 PM
|
0
|
0
|
600
|
POST
|
When I listen for MouseDown events on a GraphicsLayer, I usually get a Graphic as the target, but when I use a UniqueValueRenderer I get a CustomSprite. I am using Picture Marker Symbols to display point data. Does anybody know how to get the graphic from a MouseDown on a GraphicsLayer using a UniqueValueRenderer? Thanks!
... View more
11-01-2010
01:16 PM
|
0
|
8
|
863
|
POST
|
Thanks, Dan. I was able to adapt your code for my purposes. Instead of using a Polygon, I just used an Extent since I was looking for a square anyway. This simplified the process a bit:
protected function Map_mapClickHandler(event:MapMouseEvent):void
{
//allow user to enter size of square desired in map units
if(tInput1.text == ""){
Alert.show("Please enter a number in the text input before clicking the map.");
}else{
var size:int = Number(tInput1.text);
var halfSize:Number = size/2;
var center:MapPoint=Map.toMapFromStage(event.stageX, event.stageY);
var extent:Extent = new Extent(center.x - halfSize,
center.y - halfSize,
center.x + halfSize,
center.y + halfSize,
map.spatialReference);
var newGraphic:Graphic = new Graphic;
newGraphic.geometry=extent;
newGraphic.symbol=symbol1;
gLayer.add(newGraphic);
}
}
This appears to be working for me. Thanks again! If anybody else has another idea, I'd still like to hear it.
... View more
10-05-2010
12:53 PM
|
0
|
0
|
290
|
POST
|
Does anybody know how to map geographical coordinates and distances to screen coordinates in pixels? I want to draw graphics at a size that correspond to actual distances on Earth. For example, a 1km grid square. It sure seems like it should be easy...but I can't figure it out. Thanks!
... View more
09-30-2010
12:31 PM
|
0
|
2
|
1182
|
POST
|
Thanks for your replies. galigeo -I'm using ArcGIS 9.3.1. rscheiltlin - You got it! I misread the article that your previous post pointed to. I only restarted the map service, not the SOM. Thanks so much for your help! So, for others who are looking for an answer: To change the number of records returned by a map service. Go to the config file location; by default this is at: C:\Program Files\ArcGIS\server\user\cfg\ open the cfg file for your service with a text editor (like Notepad); these are named by the follow pattern: <configuration name>.<service type>.cfg find <MaxRecordCount>500</MaxRecordCount> Change the 500 to your desired value. save the file. restart the ArcGIS Server Object Manager service, (Control Panel -> Administrator Tools -> Services) Thanks again!
... View more
09-30-2010
10:54 AM
|
0
|
0
|
347
|
POST
|
It seems that graphicsLayers (and probably all layers) pass mouse event to their children so only the children respond. I found that I can avoid errors by changing my code to protected function fLayer_mouseDownHandler(event:MouseEvent):void
{
if(event.target is ClusterGraphic) {
var gr:ClusterGraphic = ClusterGraphic(event.target);
var grs:Array = gr.cluster.graphics;
for each(var g in grs) {
}
}
} I'd still like to know if anybody has thoughts on a better way to do this.
... View more
09-29-2010
05:40 PM
|
0
|
0
|
498
|
POST
|
If you're using a shared instance of a symbol, then any change you make will apply to that symbol no matter where or when you use it. You might need to create a new instance of your InfoSymbol every time you use it.
... View more
09-29-2010
05:30 PM
|
0
|
0
|
177
|
POST
|
I'm using a query to return features to a GraphicLayer. I have already set the MaxRecordCount for the map service config file, but I never get more than 500 records. Please help me to get more than 500 records in a single query!
... View more
09-29-2010
05:19 PM
|
0
|
3
|
2712
|
POST
|
I'm partway there on a solution, but I don't think it's the best option. I've used the MouseDown event for the whole FeatureLayer. Then I grab the target of the event and cast it as a ClusterGraphic. Like this: protected function fLayer_mouseDownHandler(event:MouseEvent):void
{
var gr:ClusterGraphic = ClusterGraphic(event.target);
var grs:Array = gr.cluster.graphics;
for each(var g in grs) {
}
} I don't have the flash debug player, so I can't tell what kind of errors or whatever I'm generating, but it appears to work fine, and I get access to all the graphics in the cluster (and more importantly, their attributes). Can anyone tell me if there's a better or more efficient way to do this? Otherwise, I guess this'll work fine.
... View more
09-22-2010
02:01 PM
|
0
|
0
|
498
|
POST
|
Thank you both very much. The example put me on the right track. It was a really silly thing. I put the .as file in the wrong folder (it didn't match the package). Thanks again!
... View more
09-22-2010
11:50 AM
|
0
|
0
|
381
|
POST
|
I know that when I draw a dynamic layer on a tiled service, I only run into problems if I try to change the specs, like extent, spatial reference, etc. Are you eplicitly setting any of these in your dynamic layer or for the map? Also, I read somewhere that when changing the extent or spatial reference, the units also need to be set. If your units are wrong, the dynamic layer may be drawing in the wrong place. I had this problem when my map units were meters and my layer units were decimal degrees. Everything was drawn very close to latlon 0,0, (off the west coast of Africa).
... View more
09-21-2010
04:16 PM
|
0
|
0
|
831
|
POST
|
Could anyone help me figure out how to use a custom class in my application? I'm sorry if this sounds like a silly question, but I've created the class, and added an import and namespace declaration into my application. FlexBuilder even provides auto-complete and other features for my class, but I get an error message if I try to build. I get the message: 1046: Type was not found or was not a compile-time constant Thanks!
... View more
09-21-2010
02:49 PM
|
0
|
3
|
703
|
POST
|
When using the GridClusterer, I'm trying to figure out how to get the mouse events on the clustered cluster graphics (as opposed to the expanded cluster graphics). It must be possible, because the FlareSymbol responds to mouseovers. I want to set the behavior when a user mouses over a CellSymbol, for example. Can anyone help me?
... View more
09-21-2010
02:39 PM
|
0
|
3
|
996
|
POST
|
I apologize if this has been asked before, but I can't find my issue in the fora. I have some aerial images (LandSat, I believe) and I want to mosaic them, but when I do, the colors keep changing. The images do not overlap. I don't know enough about this software or its processes to figure out what's going on. I would appreciate any help in determining what's happening or how I can keep the colors of the original image rasters when they are mosaicked (or combined in a catalog). Thanks!
... View more
04-20-2010
04:12 PM
|
0
|
7
|
3195
|
Title | Kudos | Posted |
---|---|---|
1 | 10-27-2016 01:41 AM | |
1 | 05-12-2015 11:58 AM | |
1 | 08-22-2017 11:48 AM | |
1 | 11-21-2016 10:43 AM | |
1 | 10-25-2016 11:43 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|