|
POST
|
Josh, Something like this:
switch(basemap)
{
case "Leaf Collection Map":
{
lyr.visible = true;
lyr2.visible = false;
lyr3.visible = false;
SiteContainer.dispatchEvent(new AppEvent(AppEvent.SET_BASEMAP, false, false, "Leaf Collection Map"));
break;
}
case "Recycle Collection Map":
{
lyr.visible = false;
lyr2.visible = true;
lyr3.visible = false;
SiteContainer.dispatchEvent(new AppEvent(AppEvent.SET_BASEMAP, false, false, "Recycle Collection Map"));
break;
}
case "Garbage Collection Map":
{
lyr.visible = false;
lyr2.visible = false;
lyr3.visible = true;
SiteContainer.dispatchEvent(new AppEvent(AppEvent.SET_BASEMAP, false, false, "Garbage Collection Map"));
break;
}
}
... View more
09-22-2010
10:24 AM
|
0
|
0
|
974
|
|
POST
|
Josh, The easiest route for you is to add a new event to the AppEvent.as and dispatch it from the buttons and listen for it in the widget. There are lots of examples of this in the viewer's code.
... View more
09-22-2010
06:42 AM
|
0
|
0
|
974
|
|
POST
|
Mattias, You do have to convert the extent to a polygon. It is easy because the extent only has 4 point. I an not somewhere that I can through together so code right now but look at the extent object and it has a minx, miny, maxx, and maxy that you would use to combine and create points that you in turn add to an array and then add to a ring of a new polygon.
... View more
09-22-2010
03:44 AM
|
0
|
0
|
712
|
|
POST
|
Naty, The reports on my site use a custom asp.net webservice to return data based on a simple ppin (id) number that I pass it and the webservice returns the associated xml data that I parse and populate a 100% flex report predefined with labels, grids,etc. I could share snipets of code but the whole code is just to specific to my site. If you want to do something like this you will have to begin with building the .Net webservice to return data based on one simple variable passed to it.
... View more
09-22-2010
03:32 AM
|
0
|
0
|
1225
|
|
POST
|
Matilda, Did you copy EVERY file in your bin-release folder or to your webserver? What web-server are you using? If it is IIS did you setup a virtual directory what is configured as an application?
... View more
09-22-2010
03:23 AM
|
0
|
0
|
822
|
|
POST
|
Phillip, It looks like you are trying to add a SFV 1.x Widget to the new FlexViewer 2.0. You can not do this without major code changes. There is no longer a com.esri.solutions.* any time you see the xmlns attribute used in the parent element think of it as just a path to a physical folder (if it doen't have library in the quotation marks). In the new FlexViewer there is no such folder called solutions. That is just the tip of the iceberg though. any import that references the same path like "import com.esri.solutions.flexviewer.SiteContainer;" is invalid not only does that path not exist the SiteContainer has been renamed the ViewContainer. There is no longer any such thing as WidgetEffects so you will have to re-code the transitions of the widget. The list goes on and on...
... View more
09-21-2010
06:44 AM
|
0
|
0
|
658
|
|
POST
|
Michael, No you don't need the 2.0 API to view a ArcGIS Server 10 Map Service. Check you REST Services directory and see if you can export the map and get an image, see if you can open the map using ArcGIS.com or javascript link. You can also use fiddler or charles to see if the requests for the map are being successfully made (as Dasa normally suggests).
... View more
09-20-2010
04:03 PM
|
0
|
0
|
530
|
|
POST
|
Sebastian, Responders have the ability for you to sent some token object with them, so you could seent the original address with the request to addressToLocations. locateTask.addressToLocations(myAddress, myOutFields, new AsyncResponder(onResult, onFault,"The original Address"));
//That's what the token is in the result
function onResult(candidates:Array, token:Object = null):void
... View more
09-20-2010
01:52 PM
|
0
|
0
|
621
|
|
POST
|
Todd, Not a problem. You need to make sure you pay close attention to whether someone ways XML with you can do without the source code and MXML with you will need the source code for.
... View more
09-20-2010
12:15 PM
|
0
|
0
|
796
|
|
POST
|
Todd, I believe this is a terminology issue. When you say you have built several FlexViewer2.0 sites already do you mean that you have added the FlexViewer 2.0 Source code to FlashBuilder as a project or just changed the xml configuration files to suit your needs? If you have only been configuring the xml files then you likely have not down loaded the FlexViewer 2.0 source code which would contain the MapManager.mxml.
... View more
09-20-2010
11:48 AM
|
0
|
0
|
796
|
|
POST
|
cmascioletti, Yep, If someone post code in this forum, than 99.8% of the time it is for people that are using the source code version of the viewer, and are compiling the code in FlashBuilder. There is no way to fix this issue if you are using the precompiled version unless you get FlashBuilder and recompile the MXML using the source code for the viewer.
... View more
09-20-2010
08:29 AM
|
0
|
0
|
703
|
|
POST
|
Yan, You have to try and understand what you are specifying when you add your attributes. This code works, because number 1 it knows that 'New' and 'Old' variable types are string where what you had would have just produced an error. This ArrayCollection that you are creating is just a collection of objects so it works as attributes for the graphic. private function addsymbol():void{
var myGraphic:Graphic=new Graphic(new MapPoint(100,50));
myGraphic.symbol=infoSymbol;
var attribs:ArrayCollection=new ArrayCollection([{myphone: "123",AGE: "New", VALUE: 23},{myphone: "2345",AGE: "Old", VALUE: 78}]);
myGraphic.attributes=attribs;
myGraphicsLayer.add(myGraphic);
}
... View more
09-20-2010
06:27 AM
|
0
|
0
|
462
|
|
POST
|
Josh, Same as I replied to the other post. private function setBasemap(basemap:String):void
{
var lyr:Layer = SiteContainer.getInstance().controller.map.getLayer("Leaf Collection Map");
var lyr2:Layer = SiteContainer.getInstance().controller.map.getLayer("Recycle Collection Map");
var lyr3:Layer = SiteContainer.getInstance().controller.map.getLayer("Garbage Collection Map");
switch(basemap)
{
case "Leaf Collection Map":
{
lyr.visible = true;
lyr2.visible = false;
lyr3.visible = false;
break;
}
case "Recycle Collection Map":
{
lyr.visible = false;
lyr2.visible = true;
lyr3.visible = false;
break;
}
case "Garbage Collection Map":
{
lyr.visible = false;
lyr2.visible = false;
lyr3.visible = true;
break;
}
}
}
... View more
09-20-2010
06:00 AM
|
0
|
0
|
744
|
|
POST
|
Josh, Try this instead. The mistake you were making is you were trying to compare a string to a layer object and they would never equal. private function setBasemap(basemap:String):void
{
var lyr:Layer = SiteContainer.getInstance().controller.map.getLayer("Leaf Collection Map");
var lyr2:Layer = SiteContainer.getInstance().controller.map.getLayer("Recycle Collection Map");
var lyr3:Layer = SiteContainer.getInstance().controller.map.getLayer("Garbage Collection Map");
switch(basemap)
{
case "Leaf Collection Map":
{
lyr.visible = true;
lyr2.visible = false;
lyr3.visible = false;
break;
}
case "Recycle Collection Map":
{
lyr.visible = false;
lyr2.visible = true;
lyr3.visible = false;
break;
}
case "Garbage Collection Map":
{
lyr.visible = false;
lyr2.visible = false;
lyr3.visible = true;
break;
}
}
}
... View more
09-20-2010
05:58 AM
|
0
|
0
|
1433
|
| 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
|