POST
|
Hi Tom, thanks for your time! I used wget on my server and the first url (http://10.202.101.108:8399/arcgis/rest/services/BGK/BGKtest/MapServer?f=lyr&v=9.3) did return a lyr-file, though it wasn't defined as a .lyr just an unknown file. Second one (http://gisdev.hallsberg.se:8399/arcgis/server/arcgisoutput/BGK_BGKtest_MapServer/lyr/5.lyr) did not, it returned an error 404: Not Found. In my ArcGIS log file posted earlier there was errors for 0.lyr, 1.lyr, 2.lyr and 5.lyr. If a look in the .../arcgisoutput/BGK_BGKtest_MapServer/lyr/ folder there actually are lyr files 0, 1, 2, 3 and a copy of them all named like 1_layername.lyr and a layers_ALL.lyr So if I use wget to get one of them it returns a lyr file. All lyr files seems to be ok in ArcMap, I have to copy them to my computer and the data sources gets broken but if I repair them they seems to work as they should. Although they lyr files pointing to a arcgis mapservice doesn't work because outside the server the domain gisdev.hallberg.se isn't recognized I have to use IP-number instead, it's a test server and the domain isn't set up in our network yet, could this be a problem? I'm running the flex application from another server using the IP-number to access the services. the full path to my ArcGIS-server configuration directory is /opt/arcgis/server10.0/server/user/cfg /Mattias
... View more
07-07-2011
12:04 AM
|
0
|
0
|
716
|
POST
|
Hi Tom! I've been looking forward to look in to this print solution a long time (my users are frequently asking for something like it), and finally I've got an ArcGIS Server 10 up and running and the time to look in to this. I haven't been able to get this to work and have some questions that I haven't found an answer to in the forum. I tried to follow your quick installations steps, but couldn't run the soemanager.bat since my server is a linux server (SUSE 10). Anyway I looked at some documentation and it seems to be enough to just copy the .jar file to ".../java/lib/ext" and register it in ArcGIS Manager. I have successfully published my layout service and enabled the PCHPrintSOE and printMap, cleared the rest cache and got my PrintUrl. What about PCHExportSOE? am I supposed to enable that one to or not? Is it important to check both PCHPrintSOE and the printMap operation? Do I need to do this for all services that will be used? (or only the layout-service)? At first I enabled both PCHPrintSOE and PCHExportSOE, print didn't worked, the service timed out, the log filed showed some "PCHExportSOE.init ERRORS" so I disabled that one on all of my services and tried again, still doesn't work. This time the errors I'm getting in the log file are "downloadFile ERRORS". It looks like this: ERROR downloadFile.destination: /tmp/AGSLayer5160090355200531065.lyr 2011-07-06T14:50:51 layout.MapServer gisdev
ERROR downloadFile.fileUrl: http://10.202.101.108:8399/arcgis/rest/services/BGK/BGKtest/MapServer?f=lyr&v=9.3 2011-07-06T14:50:51 layout.MapServer gisdev
ERROR downloadFile.FileNotFoundException: http://gisdev.hallsberg.se:8399/arcgis/server/arcgisoutput/BGK_BGKtest_MapServer/lyr/5.lyr 2011-07-06T14:50:51 layout.MapServer gisdev
ERROR downloadFile.destination: /tmp/PCHPrintSOELayer1449693673605285143.lyr 2011-07-06T14:50:51 layout.MapServer gisdev
ERROR downloadFile.fileUrl: http://gisdev.hallsberg.se:8399/arcgis/server/arcgisoutput/BGK_BGKtest_MapServer/lyr/5.lyr 2011-07-06T14:50:51 layout.MapServer gisdev
ERROR downloadFile.destination: /tmp/PCHPrintSOELayer4366513632110866785.lyr 2011-07-06T14:50:50 layout.MapServer gisdev
ERROR downloadFile.fileUrl: http://gisdev.hallsberg.se:8399/arcgis/server/arcgisoutput/BGK_BGKtest_MapServer/lyr/2.lyr 2011-07-06T14:50:50 layout.MapServer gisdev
ERROR downloadFile.destination: /tmp/PCHPrintSOELayer6368293072691338280.lyr 2011-07-06T14:50:50 layout.MapServer gisdev
ERROR downloadFile.fileUrl: http://gisdev.hallsberg.se:8399/arcgis/server/arcgisoutput/BGK_BGKtest_MapServer/lyr/1.lyr 2011-07-06T14:50:50 layout.MapServer gisdev
ERROR downloadFile.destination: /tmp/PCHPrintSOELayer1586290742058941262.lyr 2011-07-06T14:50:49 layout.MapServer gisdev
ERROR downloadFile.fileUrl: http://gisdev.hallsberg.se:8399/arcgis/server/arcgisoutput/BGK_BGKtest_MapServer/lyr/0.lyr 2011-07-06T14:50:49 layout.MapServer gisdev Any idea what that means and what I could do to get this working? (My server is not public so I can't give you any urls to my service directory or something like that) /Mattias
... View more
07-06-2011
05:37 AM
|
0
|
0
|
784
|
POST
|
I Have the same problem, but the solution doesn't work for me. Using the suggested code results in an error: 1120: Access of undefined property numberOfStyleColors. I'm currently still in Flexviewer 2.1, maybe that's the reason?
... View more
05-05-2011
04:46 AM
|
0
|
0
|
357
|
POST
|
Jay, I'm not sure which problem you're referring to, I've mentioned at lest two in this thread 😃 First post was about the application didn't work at all on some computors even though they had flash player 10 or higher installed. I haven't done anything to solve this, but haven't heard of that problem from anyone for a long time now. Second post was about not being able to open the application at first but it worked when I opened a second browser window. That was something in my changes to my mapmanager.mxml, I don't know exactly what because I didn't got any errors in flashbuilder, but I changed back to some older code and rewrote it a bit different and got it working after that. Maybe this wasn't very helpful but it's all I can say.
... View more
04-19-2011
11:07 PM
|
0
|
0
|
419
|
POST
|
Any plans to add support for WFS in the API and the Flex Viewer? I would like to see that.
... View more
04-06-2011
07:03 AM
|
0
|
0
|
560
|
POST
|
Shannaka, I guess normally you could use the fetchSharedData() in the init function, I use it a bit later because I call a few other functions in my init functions that creates some components and set there values based on info in the config file. But the important thing is that you've added the eventlistenter ( ViewerContainer.addEventListener(AppEvent.DATA_SENT, sharedDataUpdated); ) before you call fetchSharedData(), it's used just to trigger that event.
... View more
03-20-2011
11:47 PM
|
0
|
0
|
622
|
POST
|
Thanks for all your help Robert! After I added the call to fetchSharedData() in widget2 it works great.
... View more
03-17-2011
01:12 AM
|
1
|
0
|
622
|
POST
|
Robert, I added the event listener to the init of widget2 and the function to that event listener. But still it doesn't work, the function never runs. My knowledge about AppEvents are limited, but I'm thinking that the event listener is added after the event is dispatched and therefor nothing happens. But if this code work for you, I guess it should work for me to, but it doesn't... What's the difference between AppEvent.DATA_PUBLISH and AppEvent.DATA_SENT? The data that is added from addSharedData in widget1 has to be stored somewhere, is there no way to access it from widget2 without any event listeners??
... View more
03-16-2011
12:28 AM
|
0
|
0
|
622
|
POST
|
Robert, No I still can't achieve all I want. If I Have my two widgets open then there is no problem for widget1 to send data to widget2 that uses the data to perform a findtask. But If widgets2 is not loaded it loads but don't perform any findtask. I want it to load and receive the data and perform the findtask. If widget2 is loaded once and then closed so the state of the widget is closed it works fine, but the problem is when the widget never have been opened/loaded during the session. I've tried to use some fetchSharedData() code at the creationComplete event for widget2 to see if there is any data with my key in shareddata, but I can't fetch any data, don't know how to use the fetchSharedData. (I saw another thread about a bug in Datamanager.as, made that change but it didn't changed anything for me).
... View more
03-15-2011
05:28 AM
|
0
|
0
|
622
|
POST
|
Thanks Robert! That was it, I didn't see that part in any code in previous posts.
... View more
03-11-2011
05:15 AM
|
0
|
0
|
373
|
POST
|
Hi! This thread helped me to communicate between widgets, I'm sending a graphic from one widget to another which use the graphic as input to an identifyTask. This works fine as long as both widgets are opened. If the user haven't opened the second widget yet I want to open that widget and send the graphic. I can open the widget (but I have to hardcode the widget id, the getWidgetId function doesn't work for me, but that's another question I asked in another thread). But if the widget is just opened it obviously didn't had time to add the eventlister and litsen to the AppEvent.DATA_PUBLISH, so nothing happens, the user has to do the same request again. Any ideas how to accomplish to open a widget and sending data to it at the same time (or at least without any user input after the widget is loaded??
... View more
03-11-2011
05:09 AM
|
0
|
0
|
622
|
POST
|
Hi, I'm trying to use this code to open a widget from another, I've added the code to my ViewerContainer, but when I'm trying to access the ViewerContainer.getWidgetId function from another widget I get an error. 1061: Call to a possibly undefined method getWidgetId through a reference with static type Class. What could I be doing wrong here, it is a public function and I have an import for com.esri.viewer.ViewerContainer in my widget but still I can't get to that function.
... View more
03-10-2011
11:35 PM
|
0
|
0
|
373
|
POST
|
I haven't done this, but I do save visible layers when user close the appliaction and load them when the user opens it again. The code I use for saving och loading visible layers might help you. Saving visible layers to SharedObjects: settingsSO = SharedObject.getLocal("HlsbgSettings");
var map:Map = ViewerContainer.getInstance().mapManager.map
acVisLayers = new ArrayCollection();
MapUtil.forEachMapLayer(map, function(layer:Layer):void {
var layVisAc:ArrayCollection;
if (layer is ArcGISDynamicMapServiceLayer) {
layVisAc = ArcGISDynamicMapServiceLayer(layer).visibleLayers;
} else if (layer is ArcIMSMapServiceLayer) {
layVisAc = ArcIMSMapServiceLayer(layer).visibleLayers;
} else if (layer is ArcGISTiledMapServiceLayer) {
layVisAc = ArcGISTiledMapServiceLayer(layer).visibleLayers;
}
var lvisObj:Object = {
name: layer.name,
visible: layer.visible,
visarray: layVisAc
}
acVisLayers.addItem(lvisObj);
});
settingsSO.data[VISLAYERS] = acVisLayers;
settingsSO.flush();
visible layers from SharedObjects: settingsSO = SharedObject.getLocal("HlsbgSettings");
if (settingsSO.size > 0) {
var acVisLayers:ArrayCollection = settingsSO.data.vislayers as ArrayCollection;
if (acVisLayers.length > 0){
MapUtil.forEachMapLayer(map, function(layer:Layer):void {
var cLayId:int = 0;
for(var i:Number=0; i < acVisLayers.length -1;i++)
{
if(acVisLayers.name == layer.name)
{
cLayId = i;
break;
}
}
if (layer is ArcGISDynamicMapServiceLayer) {
layer.visible = acVisLayers[cLayId].visible;
ArcGISDynamicMapServiceLayer(layer).visibleLayers = acVisLayers[cLayId].visarray;
} else if (layer is ArcIMSMapServiceLayer) {
layer.visible = acVisLayers[cLayId].visible;
ArcIMSMapServiceLayer(layer).visibleLayers = acVisLayers[cLayId].visarray;
} else if (layer is ArcGISTiledMapServiceLayer) {
layer.visible = acVisLayers[cLayId].visible;
}
});
}
}
} (The code is actually from something Robert Scheitlin wrote for SFV 1.3 that I've modified just a little bit to work in my SFV 2.1)
... View more
02-22-2011
10:16 PM
|
0
|
0
|
235
|
POST
|
Thanks for this! I already have a copy XY contextmenu, and a tool for GoTo XY, and don't really need the projecting. But still this one is very useful because now I can use this widget with a few modifications instead of adding a lot of code in the main application like mapmanager and other files which i try to avoid as much as possible. Great work! thanks again.
... View more
02-18-2011
02:46 AM
|
0
|
0
|
1639
|
Title | Kudos | Posted |
---|---|---|
1 | 10-14-2015 01:59 AM | |
1 | 06-13-2024 12:31 AM | |
2 | 03-28-2024 01:07 AM | |
1 | 03-27-2024 04:09 AM | |
1 | 06-13-2024 12:22 AM |
Online Status |
Offline
|
Date Last Visited |
5 hours ago
|