How to set base map dynamically in sample flex viewer?

374
2
06-17-2010 12:26 AM
grahamcooke
Occasional Contributor
I have worked out how to pass a url from a .net host app to a simple flex application thanks to some help on this forum:

http://forums.arcgis.com/threads/5793-Pass-map-service-layer-to-Flex-dynamically-from-.NET-host-appl...

now that I have proved I can do this, I want to start using the sample flex viewer as my flex app and be able to set the maps dynamically there. As far as I can see though, the base maps are coded into the config.xml. How would I dynamically change these based on a map service URL I am passing in from .NET

Hope someone can help?
Tags (2)
0 Kudos
2 Replies
grahamcooke
Occasional Contributor
I sorted this out, I had everything right, but I needed to comment the proxy line in the mapmanager.mxml as per one of Robert Scheitlins posts on the old forum.

However i have another problem now that I hope someone can help me with. I managed to embed a simple mxml application in an aspx page with not problems. I was then able to run my asp.net website and redirect to the flex app from within there. I now want the same website to have the sample flex viewer embedded in the aspx page and redirect to that. I have implemented this by copying what is in the index.html into the aspx page but when i run the website and redirect to the sample flex viewer host page, I get an httpservice error.

Can anyone point me in the right direction please?
0 Kudos
grahamcooke
Occasional Contributor
just in case anyone stumbles across this thread, i fixed this. I didnt realise you have to copy EVERYTHING from the bin-release folder of the flex project into the folder that holds the aspx page which will host your flex app.

When i did this and rebuilt the website everything worked fine!
0 Kudos