POST
|
Hi, Can you check if you have nulls in your array of Graphics. That can lead to this error.
... View more
04-23-2013
01:37 PM
|
0
|
0
|
209
|
POST
|
Hi Jason, As you noticed there are several approach to solve your issue: The easiest one I would say is to directly set a different PictureMarkerSymbol to each graphic. You could create a custom symbol. Look at the sample http://resources.arcgis.com/en/help/flex-api/samples/index.html#/Custom_Symbol/01nq00000090000000/ And the last one is using a renderer. The renderer is great to reuse the symbols and also to be able to break on several attributes of the Graphic. http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/renderers/package-detail.html Maybe the one you are looking for is the UniqueValueRenderer: http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/renderers/UniqueValueRenderer.html Creating a custom Renderer is also possible by implementing IRenderer. The function to implement is getSymbol(graphic:Graphic):Symbol Inside your implementation you can do whatever you want to return a Symbol based on a Graphic. When the layer will draw, it will go through each Graphic and call that function to get the symbol to draw with.
... View more
04-18-2013
10:03 AM
|
0
|
0
|
243
|
POST
|
Hi, I would suggest that you loop through the layers of your map, for each one of them loop thought the layer's info: http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/ArcGISDynamicMapServiceLayer.html#layerInfos if the layer is a FeatureLayer check the layerDetails property: http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/layers/FeatureLayer.html#layerDetails to find the fields to display in the 2nd dropdown. PS: I would suggest to write in English to let more people understand what you want and be able to reply to you. 🙂
... View more
04-17-2013
01:37 PM
|
0
|
0
|
119
|
POST
|
Ho, The PopUpRendererSkin is in the skins folder of the API, not the viewer.
... View more
04-16-2013
04:04 PM
|
0
|
0
|
421
|
POST
|
It wasn't replaced in 3.1. It's under the skin folder: skins\src\com\esri\ags\skins
... View more
04-09-2013
01:13 PM
|
0
|
0
|
421
|
POST
|
Hi, FlashBuilder is built on top of eclipse so you can install J2EE plugins on top of it. In Eclipse, use the install manager: Help > Install New Software.
... View more
04-03-2013
08:29 AM
|
0
|
0
|
193
|
POST
|
Hi, Instead of updating the mapPoint, set it to the feature: var geom:MapPoint = ModelEdit.instance.editor.attributeInspector.activeFeature.geometry as MapPoint; geom.update(geoLocateWebMerc.x, geoLocateWebMerc.y, Model.instance.map.spatialReference); ModelEdit.instance.editor.attributeInspector.activeFeature.geometry = geom; This should redraw only that feature. On a mobile I have a feature layer and am trying to move a point feature to my current GPS location. The following is a code snippet. I'm finding the only way I can get the point to reposition is if I refresh() the featurelayer. Is there any way to avoid needing to do this? if(FlexGlobals.topLevelApplication.geoLong != null && FlexGlobals.topLevelApplication.geoLat != null) { //Remove the glow ModelEdit.instance.editor.attributeInspector.activeFeature.filters = []; //Remove attribute inspector okButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK, true, false)); var geoLocateIt:MapPoint = new MapPoint(FlexGlobals.topLevelApplication.geoLong, FlexGlobals.topLevelApplication.geoLat, Model.instance.map.spatialReference); var geoLocateWebMerc:* = WebMercatorUtil.geographicToWebMercator(geoLocateIt); (ModelEdit.instance.editor.attributeInspector.activeFeature.geometry as MapPoint).update(geoLocateWebMerc.x, geoLocateWebMerc.y, Model.instance.map.spatialReference); //HOW DO I AVOID REFRESHING THE FEATURELAYER (ModelEdit.instance.editor.attributeInspector.activeFeature.graphicsLayer as FeatureLayer).refresh(); (ModelEdit.instance.editor.attributeInspector.activeFeature.graphicsLayer as FeatureLayer).applyEdits(null, [ModelEdit.instance.editor.attributeInspector.activeFeature], null); (ModelEdit.instance.editor.attributeInspector.activeFeature.graphicsLayer as FeatureLayer).addEventListener(FeatureLayerEvent.EDITS_COMPLETE, editCompleteHdlr) } Thanks --Rory
... View more
04-01-2013
09:19 AM
|
0
|
0
|
270
|
POST
|
Hi, Can you verify that "myMap" in not null before calling pushView ?
... View more
03-28-2013
06:46 PM
|
0
|
0
|
423
|
POST
|
Cool! You could fix it actually by setting on the dynamic layers the maxImageHeight and maxImageWidth values to 2048. This property are automatically set by 10.1 servers' layers.
... View more
03-20-2013
09:26 AM
|
0
|
0
|
1272
|
POST
|
Hi, I can't reproduce the issue with the following code:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags"
xmlns:components="com.esri.ags.components.*"
minHeight="600"
minWidth="955">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<esri:Map id="map">
<esri:ArcGISTiledMapServiceLayer/>
<esri:ArcGISDynamicMapServiceLayer url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/MapServer"/>
</esri:Map>
<components:RotationWheel id="wheel"
left="48" top="24"
change="map.rotateTo(wheel.mapRotation, wheel.mapRotation == 0)"
mapRotation="{map.mapRotation}"/>
</s:Application>
What is the version of your server?
... View more
03-19-2013
05:03 PM
|
0
|
0
|
1272
|
POST
|
Hi, Indeed the PictureMarkerSymbol doesn't dispatch event when its source is loaded. What you can do is to prior load the image using an Loader then pass its content as the source of the PMS. <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" applicationComplete="applicationCompleteHandler(event)" minHeight="600" minWidth="955"> <fx:Script> <![CDATA[ import com.esri.ags.symbols.PictureMarkerSymbol; import mx.core.UIComponent; import mx.events.FlexEvent; import mx.managers.PopUpManager; protected function applicationCompleteHandler(event:FlexEvent):void { var loader:Loader = new Loader(); loader.load(new URLRequest("http://resources.arcgis.com/en/help/flex-api/samples/01nq/assets/warningsmall.gif")); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadCompleteHandler); } protected function loadCompleteHandler(event:Event):void { // source is loaded var loaderInfo:LoaderInfo = event.target as LoaderInfo; var pmsSource:Bitmap = loaderInfo.content as Bitmap; var pms:PictureMarkerSymbol = new PictureMarkerSymbol(pmsSource); // For the example var swatch:UIComponent = pms.createSwatch(); PopUpManager.addPopUp(swatch, this); PopUpManager.centerPopUp(swatch); } ]]> </fx:Script> </s:Application>
... View more
03-12-2013
12:08 PM
|
0
|
0
|
402
|
POST
|
Hi, Try setting the property smoothing to false on the annotation layers. Yann
... View more
03-12-2013
11:22 AM
|
0
|
0
|
333
|
POST
|
Hi, To send the STYLES parameter in the GetMap request, add it to the url of your service like that: <esri:WMSLayer url="http://wms.jpl.nasa.gov/wms.cgi?STYLES=Mar"> example not working but this is the way you have to take.
... View more
02-26-2013
11:21 AM
|
0
|
0
|
148
|
POST
|
Hi, Use the textAttribute property on the TextSymbol to specify which attribute of your Graphics as text. In the example below, each Graphic has an attribute myLabelField.
<esri:Map>
<esri:ArcGISTiledMapServiceLayer/>
<esri:GraphicsLayer>
<!-- Note: the TextSymbol defines the attribute to use as the text -->
<esri:symbol>
<esri:CompositeSymbol>
<esri:SimpleMarkerSymbol color="0xFF0000"
size="1"
style="circle"/>
<esri:TextSymbol background="true"
color="0xFF0000"
textAttribute="myLabelField">
<flash:TextFormat bold="true"
font="Verdana"
italic="false"
size="15"
underline="false"/>
</esri:TextSymbol>
</esri:CompositeSymbol>
</esri:symbol>
<esri:Graphic>
<esri:geometry>
<esri:WebMercatorMapPoint lon="-4.485556" lat="48.390834"/>
</esri:geometry>
<esri:attributes>
<fx:Object myLabelField="Brest"/>
</esri:attributes>
</esri:Graphic>
<esri:Graphic>
<esri:geometry>
<esri:WebMercatorMapPoint lon="-117.1825" lat="34.054722"/>
</esri:geometry>
<esri:attributes>
<fx:Object myLabelField="Redlands"/>
</esri:attributes>
</esri:Graphic>
</esri:GraphicsLayer>
</esri:Map>
... View more
02-12-2013
08:06 AM
|
0
|
0
|
257
|
POST
|
Thanks for the feedback! There are indeed 2 issues with embedded assets in the MapImageLayer. Here's a workaround, encode the source of the map images to byteArrays, and add them when the Map is loaded.
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:esri="http://www.esri.com/2008/ags"
xmlns:components="components.*">
<fx:Script>
<![CDATA[
import com.esri.ags.geometry.WebMercatorExtent;
import com.esri.ags.layers.MapImageLayer;
import com.esri.ags.layers.supportClasses.MapImage;
import mx.graphics.codec.PNGEncoder;
// any small image will do
[Embed("resources/images/mapping-charting.jpg")]
private const img1:Class;
[Embed("resources/images/logo-esri.png")]
private const img2:Class;
[Embed("resources/images/the-power-of-maps.png")]
private const img3:Class;
private var weathermapimage:MapImage;
private var weathermapimage2:MapImage;
private var weathermapimage3:MapImage;
private var mil:MapImageLayer;
private function zoomFails():void {
mil = new MapImageLayer();
map.addLayer(mil);
var encoder:PNGEncoder = new PNGEncoder();
var bitmap:Bitmap;
var sourceImg1:ByteArray;
var sourceImg2:ByteArray;
var sourceImg3:ByteArray;
bitmap = new img1();
sourceImg1 = encoder.encode(bitmap.bitmapData);
bitmap = new img2();
sourceImg2 = encoder.encode(bitmap.bitmapData);
bitmap = new img3();
sourceImg3 = encoder.encode(bitmap.bitmapData);
weathermapimage = new MapImage();
weathermapimage.extent = new WebMercatorExtent(-153,35,-110,50);
weathermapimage.source = sourceImg1;
mil.add(weathermapimage);
weathermapimage2 = new MapImage();
weathermapimage2.extent =new WebMercatorExtent(-3,25,38,44);
weathermapimage2.source = sourceImg2;
mil.add(weathermapimage2);
weathermapimage3 = new MapImage();
weathermapimage3.extent =new WebMercatorExtent( -111,-15 ,-70,10);
weathermapimage3.source = sourceImg3;
mil.add(weathermapimage3);
}
]]>
</fx:Script>
<esri:Map id="map" load="zoomFails()" >
<esri:ArcGISTiledMapServiceLayer id="mapsl" url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
</esri:Map>
</s:Application>
... View more
02-06-2013
09:24 AM
|
0
|
0
|
157
|
Title | Kudos | Posted |
---|---|---|
1 | 12-15-2022 09:20 AM | |
3 | 08-26-2020 04:24 PM | |
1 | 07-18-2016 04:44 PM | |
1 | 12-12-2017 02:42 PM | |
1 | 12-12-2017 11:01 AM |
Online Status |
Offline
|
Date Last Visited |
03-19-2024
10:23 PM
|