|
POST
|
hoytal, Yes you can have layers in a different projection as long as they are not specified as tiled. You will take a performance hit doing this tough as ArcGIS Server will have to re-project the map services that are not in the same projection as the map.
... View more
09-27-2010
01:30 PM
|
0
|
0
|
537
|
|
POST
|
Carl, Sure just remove these lines of the SplashWidget.xml
<p align='center'>
<img src='assets/images/globe.png' width='140' height='140' />
</p>
... View more
09-27-2010
11:38 AM
|
0
|
0
|
1099
|
|
POST
|
Lisa, Here is some code to do this in FlexViewer 2.1 Just replace the existing function in MapManager.mxml with this one.
//map load complete
private function mapLoadComplete(event:MapEvent):void
{
try
{
if (ExternalInterface.available)
{
var result:URLVariables = new URLVariables();
var urlSubstring:String = ExternalInterface.call("window.location.search.substring", 1);
if (urlSubstring && urlSubstring.length > 0 && urlSubstring != "debug=true")
{
result.decode(urlSubstring);
// Parse URL
var xExt:String;
var xUrlParam:String;
var yLat:String;
var xLon:String;
var mScale:String;
if (result["EXT"])
xExt = result.EXT;
if (result["LAT"])
yLat = result.LAT;
if (result["LON"])
xLon = result.LON;
if (result["SCALE"])
mScale = result.SCALE;
if(!yLat == "" && !xLon == "")
{
var spatRef:SpatialReference = new SpatialReference(4326);
var cPoint:MapPoint = new MapPoint(parseFloat(xLon), parseFloat(yLat),spatRef);
if(!mScale==""){
map.scale = parseInt(mScale);
}else{
map.scale = 20000;
}
if (map.spatialReference.wkid != 4326)
{
map.cursorManager.setBusyCursor();
var geomServ:GeometryService = new GeometryService("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer");
geomServ.addEventListener(GeometryServiceEvent.PROJECT_COMPLETE,pResult);
geomServ.addEventListener(FaultEvent.FAULT,pFault);
geomServ.project([cPoint],map.spatialReference);
function pResult(event:GeometryServiceEvent):void{
var pt:MapPoint = (event.result as Array)[0]as MapPoint;
map.centerAt(pt);
map.cursorManager.removeBusyCursor();
}
function pFault(err:Object):void{
map.cursorManager.removeBusyCursor();
}
} else{
map.centerAt(cPoint);
}
}
if (!xExt == ""){
var extArray:Array = xExt.split(",");
var extent:Extent = new Extent(Number(extArray[0]), Number(extArray[1]), Number(extArray[2]), Number(extArray[3]),map.spatialReference);
map.extent = extent;
}
}
}
}
catch (error:Error){}
}
And add these imports to the MapManager.mxml too.
import com.esri.ags.events.GeometryServiceEvent;
import com.esri.ags.geometry.MapPoint;
import com.esri.ags.tasks.GeometryService;
import com.esri.ags.geometry.Geometry;
And feed it a url like this ?LON=-111.88376501599998&LAT=40.75807050000003&SCALE=10000
... View more
09-27-2010
07:54 AM
|
0
|
0
|
997
|
|
POST
|
Emily, I still don't see a crossdomain on this server... http://gis.slco.org/crossdomain.xml But using the Flash Builder debugger I was able to load your config.xml and it worked fine. You do not have anything from your map service displayed even once you check the map service as visible due to scale dependencies that you have set but once I zoom in once it displays fine.
... View more
09-27-2010
07:19 AM
|
0
|
0
|
1629
|
|
POST
|
Emily, Yes if your mapservices are in a different projection than the map they have to be dynamic. The quality and responsiveness of a map that has multiple map services that require re-projection is going to be pretty slow. It is always best to reproject your data to be in the same WKID as the base maps you are using. There are some changes to the 2.1 Flexviewer that could be affecting you. Maybe you should post your config.xml.
... View more
09-27-2010
06:20 AM
|
0
|
0
|
1629
|
|
POST
|
Henry, I have to say that you are the first to say that the visible option in my 1.3 version does not work. I have many people using it that have said just the opposite. Don't know what to tell you... Knowing the code and what it is doing it is not logical that you are having any issue.
... View more
09-27-2010
06:07 AM
|
0
|
0
|
1517
|
|
POST
|
Ian, Yes you are right on track with what you are trying to do. Let me tell you if you are not an experienced developer than what you are attempting is going to be very difficult. In ArcMap it is easy to add a legend, resize it, force new columns, etc. because it is an actual com object.
... View more
09-27-2010
06:03 AM
|
0
|
0
|
962
|
|
POST
|
Matilda and Josh, The issue with the zip file be corrupted is a known issue with Internet Explorer and this forum. The original zip is not actually corrupted you just have to use any browser other that IE to download it. My preference is Firefox.
... View more
09-27-2010
05:58 AM
|
0
|
0
|
2601
|
|
POST
|
Ian, I will push out a new version with a public exportImage function soon but until then here is what you would need to add.
//New imports needed
import spark.primitives.BitmapImage;
import mx.graphics.ImageSnapshot;
//Add this new public function
public function exportImage():BitmapImage
{
var bmpLegend:BitmapData = ImageSnapshot.captureBitmapData(legendDataGroup);
var printImg:BitmapImage = new BitmapImage();
printImg.smooth = true;
printImg.source = bmpLegend;
return printImg;
}
//Also the LegendDatGroup needs an Id
<Legend:LegendDataGroup id="legendDataGroup" dataProvider="{legendAC}">
... View more
09-26-2010
04:58 PM
|
0
|
0
|
962
|
|
POST
|
Henry, I can seem to find that thread anymore either... Oh well here is my version 1.3
... View more
09-26-2010
04:38 PM
|
0
|
0
|
1517
|
|
POST
|
All, It has been updated again based on comments from Ernst. Version 2.1.3
... View more
09-25-2010
07:05 AM
|
0
|
0
|
2531
|
|
POST
|
Ernst, Thanks for the feedback I see my issue with the zoom2message you need to put it inside the lables parent element in the IdentifyWidget.xml. Like this:
<labels>
<zoom2message>Test - Click to Zoom to Point</zoom2message>
<identifylabel>Identify</identifylabel>
<resultslabel>Results</resultslabel>
<descriptionlabel>Use the identify tool to identify features on the map:</descriptionlabel>
<pointlabel>Identify</pointlabel>
<clearlabel>Clear</clearlabel>
<loadinglabel>Loading...</loadinglabel>
<selectionlabel>Features Identified:</selectionlabel>
</labels>
for the layers options, first you don't need to pay to much attention to the REST Documentation as this is how REST behind the flex api is handling the requests. When the REST API is talking about all:2,4 that is the same as the Flex AGS API senting the IdentifyParameters.layerOption of all and IdentifyParameters.layerIds = [2,4] The options "top", "visible:1" or "all:2,4" have strange behaviour when you have more operational mapservices. If you have 2 mapservices, the result of "top" gives you 2 layers back! This is actually the expected behavior as an identify task is exectuted for each map service in your map so "top" will return the top layer for each map service or operational layer in your map. As far as the keeping the identify tool active after the initial identify all you need to do is add activateIdentifyTool(); in to the drawEnd function. I will add an option for this to the config. For the mousing over the graphic this has never been available for the identify because you need to consider which layer you would display the results for since all the layers are identified using the same exact point. This is just not feasible.
... View more
09-25-2010
06:07 AM
|
0
|
0
|
2531
|
|
POST
|
Gary, A few aspects that interest me are how you popup a box for the report, from the button on the widget. Previously I would've defined a canvas within the main mxml file but now thats all very rigid and just defining the mapmanager, uimanager, etc... Also, the formatting of the report is pretty sweet, is that strictly mxml code? Or is that some type of internal, non-flex frame content? And lastly, the speed is pretty fast retrieving the data, could you embellish a little on the asp.NET web service? Is it a geoprocessing task or some other type of spatial database query? The button is part of a custom data repeater that just lauches a canvas (seperate mxml component) from a popupmanager. The formatting is 100% MXML, Styling, and ActionScript. It is not hard to use absolute postioning and just drag textAreas where you want them in design view. The speed of reteiving that data is just limiting what data is transfered to the bare minimum. I'm really not going to go into much detail on the .Net web service other than to say it is a simple asp.Net web service that querys NON-spatial data and returns it as XML. Hope this answers some things for you.
... View more
09-24-2010
08:56 PM
|
0
|
0
|
1230
|
|
POST
|
Naty, Attached is the code for one of the easier reports (kind of), my tax bill. Having said that I looked at the code and started to make some comments in the code and got to thinking crap, I hope some beginner doesn�??t see this thread and think that they can jump right in and start using this code... So let me Warn OTHERS right now that if you are a beginner in flex don't think you can take this code and ask me how to implement it if you don't have some ability to follow the code and have a clue what it is doing. This is not Plug and Play or even close... Now that I am done with that. The principle of this is pretty simple we have a widget (not in all it formality), that holds the bill which is just another canvas that has textAreas positioned at absolute values and having background colors, etc. The widget gets brought to life using a popupmanager from some button click and in its init function fires off a webservice request back to your .Net web service to get the data it needs and once it has the data it fills in the appropriate textAreas. In principle it is pretty simple. Hope you can make heads or tails of my code I did not make it pretty or comment it a bunch as I never really intended to share it. I did change some stuff in the code like the url of my web service and I also did not include and of the css or icons as this is just a code example of how you can make this work for you.
... View more
09-24-2010
08:46 PM
|
0
|
0
|
1230
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-14-2020 11:36 AM | |
| 17 | 05-17-2021 01:51 PM | |
| 1 | 07-06-2020 05:32 AM | |
| 1 | 07-10-2018 05:49 AM | |
| 9 | 01-28-2022 10:58 AM |
| Online Status |
Offline
|
| Date Last Visited |
06-08-2026
06:27 AM
|