Select to view content in your preferred language

viewing published map service using flex API

396
2
08-13-2012 10:19 AM
NadeemQazi
Regular Contributor
I am using Flush builder 4.6 .I  want to use map service published on my server having following URL
http://localhost/ArcGIS_server/rest/services/aiportMoneve_Activeonlu/MapServer
I have tested it using ARCGIS VIEWER and it works there. However when I  want to used this service using FLEX API under flash builder it did not work. I have following sample code in MXML file. This code does complied and a new web pagei is opened in the browser when this file is run. but the the web page only shionow esri logo and does not show the map that i published on my server. Any suggest

<?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:mx="library://ns.adobe.com/flex/halo"
xmlns:esri="http://www.esri.com/2008/ags"
pageTitle="A tiled map service"
>
<fx:Declarations>
  <esri:SpatialReference id="wgs" wkid="4326"/>
  </fx:Declarations>

<esri:Map id="myMap">
  <esri:extent>
   <esri:Extent xmin="-103" ymin="36" xmax="-94" ymax="41" spatialReference="{wgs}"/>
  </esri:extent>
  <esri:ArcGISTiledMapServiceLayer
   url="http://localhost/ArcGIS_server/rest/services/aiportMoneve_Activeonlu/MapServer"/>
  <esri:ArcGISDynamicMapServiceLayer
   id="myLayer"
   url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServ..." />
</esri:Map>

</s:Application>
Tags (2)
0 Kudos
2 Replies
AnthonyGiles
Honored Contributor
Nadeem,

Has your map service been published with a geographic WGS84 projection, as this is what you are telling your application to expect.

Regards

Anthony
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

Has your map service been published with a geographic WGS84 projection, as this is what you are telling your application to expect.

Regards

Anthony


Thanks Anthony, Actually I just published using the  server wizard I am not sure , Please let me know how can  i check this.
Regards
Nadeem
0 Kudos