|
POST
|
Meengla, This was always an issue, but I fixed it a while ago so here is the new code for the LegendData.mxml file. it uses a loader that loads the bytes from the image url instead of just having the image reference the url that might have been deleted on the server. <?xml version="1.0" encoding="utf-8"?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
// Copyright © 2008 ESRI
//
// All rights reserved under the copyright laws of the United States.
// You may freely redistribute and use this software, with or
// without modification, provided you include the original copyright
// and use restrictions. See use restrictions in the file:
// <install location>/FlexViewer/License.txt
//
////////////////////////////////////////////////////////////////////////////////
-->
<mx:HBox xmlns:mx ="http://www.adobe.com/2006/mxml"
xmlns:flash ="flash.filters.*"
width ="95%"
minHeight ="22"
backgroundAlpha ="1"
paddingLeft ="3"
paddingRight ="3"
verticalAlign ="middle" backgroundColor="#FFFFFF">
<mx:Script>
<![CDATA[
import flash.display.Loader;
[Bindable]
private var recicon:String = "";
[Bindable]
private var title:String;
private var _infoData:Object;
private var _loader:Loader;
public function get infoData():Object
{
return _infoData;
}
public function set infoData(value:Object):void
{
_infoData = value;
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE,function(e:Event):void
{
recIcon.source = e.currentTarget.content;
recIcon.visible = true;
recIcon.includeInLayout = true;
}
);
_loader.load(new URLRequest(encodeURI(infoData.icon)));
title = infoData.title;
}
]]>
</mx:Script>
<mx:Image id="recIcon" visible="false" includeInLayout="false" />
<mx:VBox verticalGap="0" width="90%">
<mx:Text selectable="false" fontWeight="bold" text="{title}" width="90%"/>
</mx:VBox>
</mx:HBox>
... View more
05-04-2010
08:19 AM
|
0
|
0
|
1309
|
|
POST
|
Tom, I ran into the same issue and had to manually specify my symbology in my data before encoding. Maybe the API team can explain this limitation or agree to fix the issue, but until then here is what I did. private function addGras():void
{
drawAC = new ArrayCollection();
var i:Number;
var symTypeName:String = "";
var symType:String = "";
var symLType:String = "";
var symFontE:String = "";
var symSize:Number = 1;
var symColor:Number = 0x000000;
var symColor2:Number = 0x000000;
var symWidth:Number = 1;
var symText:String = "";
var symAlpha1:Number = 1;
var symAlpha2:Number = 1;
var geomType:String = "";
var geomSR:Number;
var gname:String = "";
for (i = 0; i < graphicsLayer.numGraphics; i++)
{
var geomArray:Array = [];
symText = "";
var gra:Graphic = graphicsLayer.getChildAt(i) as Graphic;
switch(gra.geometry.type)
{
case Geometry.MAPPOINT:
{
if (gra.symbol is TextSymbol) {
var txtSym:TextSymbol = gra.symbol as TextSymbol;
symTypeName = "TextSymbol";
var txtFormat:TextFormat = txtSym.textFormat;
if(useDefaultFont){
symType = "Arial"
}else{
symType = txtFormat.font
}
symText = txtSym.text;
if (txtFormat.bold)
symFontE += "B"
if (txtFormat.italic)
symFontE += "I"
if (txtFormat.underline)
symFontE += "U"
symSize = Number(txtFormat.size);
symColor = Number(txtFormat.color);
} else {
var ptSym:SimpleMarkerSymbol = gra.symbol as SimpleMarkerSymbol;
symTypeName = "SimpleMarkerSymbol";
symType = ptSym.style;
symColor = ptSym.color;
symSize = ptSym.size;
symAlpha1 = ptSym.alpha;
symColor2 = ptSym.outline.color;
symAlpha2 = ptSym.outline.alpha;
symWidth = ptSym.outline.width;
symLType = ptSym.outline.style;
}
geomType = "MAPPOINT";
var pnt:MapPoint = gra.geometry as MapPoint;
geomSR = gra.geometry.spatialReference.wkid
geomArray.push(pnt);
break;
}
case Geometry.POLYLINE:
{
var lineSym:SimpleLineSymbol = gra.symbol as SimpleLineSymbol;
symTypeName = "SimpleLineSymbol";
symType = lineSym.style;
symWidth = lineSym.width;
symAlpha1 = lineSym.alpha;
symColor = lineSym.color;
geomType = "POLYLINE";
var polyline:Polyline = gra.geometry as Polyline;
for (var i1:int = 0; i1 < polyline.paths.length; i1++)
{
for (var j:int = 0; j < polyline.paths[i1].length; j++)
{
var mp:MapPoint = polyline.getPoint(i1,j) as MapPoint;
geomArray.push(mp);
}
}
geomSR = gra.geometry.spatialReference.wkid
break;
}
case Geometry.POLYGON:
{
var polySym:SimpleFillSymbol = gra.symbol as SimpleFillSymbol;
symTypeName = "SimpleFillSymbol";
symType = polySym.style;
symWidth = polySym.outline.width;
symLType = polySym.outline.style;
symAlpha1 = polySym.alpha;
symAlpha2 = polySym.outline.alpha
symColor = polySym.color;
symColor2 = polySym.outline.color;
geomType = "POLYGON";
var poly:Polygon= gra.geometry as Polygon;
for (var i2:int = 0; i2 < poly.rings.length; i2++)
{
for (var j1:int = 0; j1 < poly.rings[i2].length; j1++)
{
var mp2:MapPoint = poly.getPoint(i2,j1) as MapPoint;
geomArray.push(mp2);
}
}
geomSR = gra.geometry.spatialReference.wkid
break;
}
case Geometry.EXTENT:
{
var rectSym:SimpleFillSymbol = gra.symbol as SimpleFillSymbol;
symTypeName = "SimpleFillSymbol";
symType = rectSym.style;
symWidth = rectSym.outline.width;
symLType = rectSym.outline.style;
symAlpha1 = rectSym.alpha;
symAlpha2 = rectSym.outline.alpha
symColor = rectSym.color;
symColor2 = rectSym.outline.color;
geomType = "EXTENT";
var rect:Extent= gra.geometry as Extent;
var mp3:MapPoint;
mp3 = new MapPoint(rect.xmin, rect.ymin, gra.geometry.spatialReference);
geomArray.push(mp3);
mp3 = new MapPoint(rect.xmax, rect.ymax, gra.geometry.spatialReference);
geomArray.push(mp3);
geomSR = gra.geometry.spatialReference.wkid
break;
}
}
var gObj:Object = {
geomtype: geomType,
geomarray: geomArray,
geomsr: geomSR,
symtypename: symTypeName,
symtype: symType,
symsize: symSize,
symcolor: symColor,
symcolor2: symColor2,
symwidth: symWidth,
symtext: symText,
symalpha1: symAlpha1,
symalpha2: symAlpha2,
cmenu: gra.contextMenu,
symfonte: symFontE,
symltype: symLType,
gname: gra.name
}
drawAC.addItem(gObj);
}
if(!fr) fr = new FileReference();
fr.save(JSON.encode(drawAC.source),"SavedGraphics.txt")
graphicsLayer.clear();
}
... View more
05-04-2010
05:54 AM
|
0
|
0
|
404
|
|
POST
|
njbarger, If you look at this thread and list the CSP_Imagery_World as the first basemap in your config.xml then that will set the LODS to go all the way to 563 that may take care of your issue. http://forums.esri.com/Thread.asp?c=158&f=2421&t=271933&mc=7#852632 If not then Yes you will need Flex or Flash Builder so that you can change the MapManager.mxml to add additional LODS (Level of Display) to the map, so that it will zoom to the level of your map data. The maps LODs are set by the first base map that is loaded, when dealing with cached map services. If you have to go this route than look at this thread. http://forums.esri.com/Thread.asp?c=158&f=2421&t=280475&mc=16#msgid869969
... View more
05-04-2010
04:14 AM
|
0
|
0
|
232
|
|
POST
|
gcooke76, Sure look here at this thread. http://forums.arcgis.com/threads/3505-Login-Page-The-connect-to-LDAP
... View more
05-04-2010
02:57 AM
|
0
|
0
|
844
|
|
POST
|
Barb, Here is a link. http://forums.esri.com/Thread.asp?c=158&f=2421&t=294714&mc=7#msgid919544
... View more
05-03-2010
10:05 AM
|
0
|
0
|
331
|
|
POST
|
sidneykelvin, Does the link field in the dynamic map service contain a fully qualified URL (i.e. my gis server machine name is calhalgisXX and the fully qualified url that resolves to that machine for the public is gis.calhouncounty.org)? So you could be doing a few things incorrectly 1. if you are using a actual path like c:\servername\inetpub\wwwroot\image_folder\picturex.jpg or 2. if you are using a url like http://calhalgisXX/image_folder/picturex.jpg and not http://gis.calhouncounty.org/image_folder/picturex.jpg. Also check in IIS to ensure that read permission is available for the image_folder.
... View more
05-03-2010
03:47 AM
|
0
|
0
|
347
|
|
POST
|
jwei, The Flex API consumes (uses) REST endpoints of map services that are published using ArcGIS Server 9.3 and above. Those map services can contain data that comes from an ArcSDE.
... View more
04-30-2010
04:51 PM
|
0
|
0
|
339
|
|
POST
|
Jim, Hope I remember how this works!;) I think it is there in these lines when the queryFeaturesText or the QueryFeaturesGraphical function are run. if (myfloatdg){
if(myfloatdg.datagrid.dataProvider)
myfloatdg.datagrid.dataProvider.removeAll();
myfloatdg.csvName = _csvName;
myfloatdg.dgAliases = fldAliases;
myfloatdg.dgColumns = gridFields;
myfloatdg.dgHyperColumns = gridHyperFields;
myfloatdg.showHyperAlias = gridHyperFieldsAlias;
myfloatdg.dProvider = gridDataProvider;
myfloatdg.graphicslayer = graphicsLayer;
myfloatdg.zoomScale = zoomScale;
myfloatdg.ownerWidget = sWidget; basically I clear the datagrid of all info and field structure and then re-assign them.
... View more
04-30-2010
04:26 AM
|
0
|
0
|
344
|
|
POST
|
Diya87, It help to understand how the XY in the Banner is getting there. Basicly when the mouse moves over a Flash Stage the mouse knows its coordinates based on the stage size and values like X: 300 and Y: 126 are returned from the mouse move event, those values are then feed to the map.toMapFromStage function and actual map coordinates are returned. There is not function on the map component that will return Z. As the Flex ArcGIS API is right now and the REST endpoint that Flex consumes there is no Z-Aware capability on a map service. The only way you could possibly get a Z Value from a DEM is to build a geoprocessing task that you could fire on a mouse click. I do not have any examples of how to do this.
... View more
04-30-2010
04:19 AM
|
0
|
0
|
1084
|
|
POST
|
Alex, This thread is probably the one you are talking about and yes you can just witch it to ArcGISDynamicMapServiceLayers. http://forums.esri.com/Thread.asp?c=158&f=2421&t=295797&mc=12#msgid924110
... View more
04-28-2010
04:12 AM
|
0
|
0
|
287
|
|
POST
|
Matthew, The new version 1.0.7 now has that ability. http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&scriptID=16599
... View more
04-26-2010
12:42 PM
|
0
|
0
|
403
|
|
POST
|
Guys, This is not to hard to do but you will have to extend the navigation class to do it. add this code as a mxml component called MyNavigation.as. It has to be in a com/esri/ags/samples folder. package com.esri.ags.samples
{
import com.esri.ags.controls.Navigation;
import flash.events.Event;
import flash.events.MouseEvent;
import mx.managers.CursorManager;
public class MyNavigation extends Navigation
{
[Embed(source="assets/images/cursors/draw_cursor.png")]
private var lineCursor:Class;
public function MyNavigation()
{
navigationSliderClass = MyNavigationSlider;
}
override protected function initializationComplete():void
{
this.addEventListener(MouseEvent.MOUSE_OVER, setCur);
this.addEventListener(MouseEvent.MOUSE_OUT, remCur);
}
private function setCur(evt:Event):void
{
CursorManager.setCursor(lineCursor,1);
}
private function remCur(evt:Event):void
{
CursorManager.removeCursor(CursorManager.currentCursorID);
}
}
} Then where your map component is make it look like this. <esri:Map id="map" navigationClass="com.esri.ags.samples.MyNavigation">
... View more
04-24-2010
01:59 PM
|
0
|
0
|
395
|
|
POST
|
All, Thought that this might interest some of the forum users, as I can remember from the old forum some have asked for this ability. FlexPaper allows you to display PDFs in your Flex App without using Adobe Reader. Check out the link. http://flexpaper.devaldi.com/
... View more
04-23-2010
11:03 AM
|
0
|
3
|
2467
|
|
POST
|
jb3t, Setting the Spatial Reference of the map is not going to help you in your situation. The ESRI Basemaps that you are using are in WGS 1984 as you know, but they are also cached which means that if you set the maps spatial reference to State Plane then those base maps would not be usable because cached map services can not be re-projected on the fly by ArcGIS Server like non-cached services can. So you have two options. 1. Make sure your map services that are State Plane are added to the map as ArcGISDynamicMapService's that way ArcGIS Server can re-project then on the fly to WGS 1984. 2. Add The ESRI Basemaps as ArcGISDynamicMapService's that way ArcGIS Server can re-project then on the fly to State Plane.
... View more
04-22-2010
04:08 AM
|
0
|
0
|
339
|
|
POST
|
Mehul, Sure attached is a simple Personal GDB with some multi-ring polygons in WGS1984
... View more
04-19-2010
02:03 PM
|
0
|
0
|
940
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM | |
| 1 | 03-28-2022 06:20 AM | |
| 1 | 01-30-2019 07:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
10-01-2025
05:12 AM
|