|
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
|
2784
|
|
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
|
1284
|
|
POST
|
Hi, Try setting the property smoothing to false on the annotation layers. Yann
... View more
03-12-2013
11:22 AM
|
0
|
0
|
1155
|
|
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
|
532
|
|
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
|
823
|
|
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
|
498
|
|
POST
|
Hi, This is a bug in the ArcGISLocalTiledLayer and it will be fixed in 3.2 In the meantime open your tpk file as a zip file and go to the folders v101\Layers\_alllayers\L18 and v101\Layers\_alllayers\L19 and modify the file names as such as it should like RxxxxCxxxx instead of RxxxxxCxxxxxx. Make sure not to uncompress the tpk, edit the name directly in the archive. Thanks
... View more
02-06-2013
08:57 AM
|
0
|
0
|
1804
|
|
POST
|
Hi Steve, You can do that by extending the API. If you want to use the MapImageLayer, extend that class. Then you can listen to time extent change in your layer and update the displayed image. In the example below I just update the rotation value of the MapImages, but could actually add or remove them from the mapImageProvider. public class TimeMapImageLayer extends MapImageLayer { override protected function addMapListeners():void { super.addMapListeners(); if (map) { map.addEventListener(TimeExtentEvent.TIME_EXTENT_CHANGE, timeExtentChangeHandler); } } override protected function removeMapListeners():void { super.removeMapListeners(); if (map) { map.addEventListener(TimeExtentEvent.TIME_EXTENT_CHANGE, timeExtentChangeHandler); } } protected function timeExtentChangeHandler(event:TimeExtentEvent):void { // Do stuff on your images... var mapImages:ArrayCollection = mapImageProvider as ArrayCollection; var mapImage:MapImage; for each (mapImage in mapImages) { if (isNaN(mapImage.rotation)) { mapImage.rotation = 0; } mapImage.rotation += 30; } invalidateLayer(); } } In your map timeSlider you now have to specify the timeStops you want. <esri:Map id="map" timeSlider="{timeSlider}"> <esri:ArcGISTiledMapServiceLayer /> <local:TimeMapImageLayer> <esri:MapImage id="image2010" source="2013.jpg"> <esri:extent> <esri:WebMercatorExtent minlat="-70" minlon="-100" maxlat="0" maxlon="90" /> </esri:extent> </esri:MapImage> </local:TimeMapImageLayer> </esri:Map> <esri:TimeSlider id="timeSlider" horizontalCenter="0" bottom="10"> <esri:timeStops> <fx:Date fullYear="2010"/> <fx:Date fullYear="2011"/> <fx:Date fullYear="2012"/> <fx:Date fullYear="2013"/> </esri:timeStops> </esri:TimeSlider> Notice that if you want to access to some Date in the MapImage you can to override the MapImage class too.
... View more
01-31-2013
04:25 PM
|
0
|
0
|
795
|
|
POST
|
Hi, This is the normal behavior. To choose the right symbol to use to draw, the Graphic looks in this order: its symbol property Its owner layer renderer property Its owner layer symbol property or a default symbol So to remove the selected symbol you have to explicitely set it to null on the previously selected Graphic. Another good way to do it may be to create a renderer on the GraphicLayer and to implement the getSymbol function. See the IRenderer interface. As an example: public function getSymbol(graphic:Graphic):Symbol { if (graphic === mySelectedGraphic) { return selectedSymbol; } return otherSymbol; } Once you have changed the mySelectedGraphic value on this renderer, call refresh() on the layer or on the previously and newly selected Graphic. Hope it helps.
... View more
01-31-2013
12:52 PM
|
0
|
0
|
1101
|
|
POST
|
Hi Rory, My advice is to create a custom skin for the InfoWindow and to remove all the code handling the automatic placement.
... View more
01-30-2013
07:17 AM
|
0
|
0
|
463
|
|
POST
|
Ok, let's dig a little more 🙂 Do you have a basemap, or it's the one? can you give me the list of LODs you already have in the map? var lods:Array = map.lods; for each (var lod:LOD in lods) { trace(lod.toString()); } Can you also check the lods in the layer? lods = localTPK.tileInfo.lods; for each (lod in lods) { trace(lod.toString()); }
... View more
01-29-2013
03:24 PM
|
0
|
0
|
1804
|
|
POST
|
Hi Rory, We are aware of this bug, which will be fixed in the 3.2. In the meantime try to set the layer as not visible when it's not on the map and put it back to visible when the new map is loaded. Yann
... View more
01-29-2013
09:39 AM
|
0
|
0
|
517
|
|
POST
|
Hi Rory, The tiled layers only display tiles if it has tiles available at the current LOD of the map In your case, you are adding LOD for the scales 3000, 1500 and 500. lods.push(new LOD(NaN, 0.6, 3000)); lods.push(new LOD(NaN, 0.3, 1500)); lods.push(new LOD(NaN, 0.1, 500)); The level 19 of your TPK has a scale of 1,128.49 and I guess the levels 18 a scale of 2256.99 and 17, 4513.98. So the map will work like this: scale 4513.98: display tiles custom LOD scale 3000: no tiles scale 2256.99: display tiles custom LOD scale 1500: no tiles scale 1,128: display tiles custom LOD scale 500: no tiles Yann
... View more
01-29-2013
09:34 AM
|
0
|
0
|
1804
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-25-2026 12:19 PM | |
| 1 | 02-23-2026 04:31 PM | |
| 2 | 02-24-2026 05:44 PM | |
| 10 | 06-27-2025 02:06 PM | |
| 1 | 12-05-2024 10:05 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-05-2026
04:29 PM
|