Select to view content in your preferred language

Simple question: Adding a MapService in the API

658
3
01-31-2012 04:22 AM
HannesRömer
Occasional Contributor
Hello!
Sorry for my beginner question: After I successfully could open and compile the samples via Flash Builder, I would like to add an own map service that I created with ArcGIS Server for a web application. When compiling my application I don't see anything. What went wrong? 

In Flash Builder I wrote:
<<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:esri="http://www.esri.com/2008/ags"
      pageTitle="Using ArcGISImageServiceLayer">
 
<esri:Map>
  <esri:ArcGISTiledMapServiceLayer url="http://columbus/ArcGIS/rest/services/vabene_temp/GIS_Flex_Parkraeume1/MapServer"/>
</esri:Map>

</s:Application>

This URL works when copying it in my webbrowser. I attached the contents of the webpage (txt) which I got when typing the url in the browser.
Maybe I have to define layers, because the service include three layers?!

Thank you 😞

Hannes
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Hannes,

   Try using this instead of ArcGISTiledMapServiceLayer:

<esri:ArcGISDynamicMapServiceLayer url="http://columbus/ArcGIS/rest/services/vabene_temp/GIS_Flex_Parkraeume1/MapServer">


Don't forget to click the top arrow (promote) and to click the Mark as answer check as shown below:
0 Kudos
HannesRömer
Occasional Contributor
Robert,


a simple answer to a simple question. Thank you very much. It works 🙂
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Hannes,

   So the reason that the first code you had didi not work is the fact that your map service is not cached. Only cached map services use the ArcGISTiledMapServiceLayer.

Don't forget to click the top arrow (promote) and to click the Mark as answer check as shown below:
0 Kudos