Select to view content in your preferred language

map is not displayed in mxml file

619
4
08-14-2012 05:24 AM
NadeemQazi
Regular Contributor
Hi
I created a map and published it as map service using ARCGIS Server and use this service using ARCGIS VIEWER. it works fine , i checked in config file and change the type from tiled to dynamic it worked fine in both cases. However when i used flex SDK under flush builder to access the same published map service it did not work. I tried both
ArcGISDynamicMapServiceLayer and  ArcGISTiledMapServiceLayer but it did not work either case. following is the code in mxml file.

<?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="A tiled map service">

<esri:Map>
  <esri:ArcGISTiledMapServiceLayer url="http://localhost/ArcGIS_server/services/testwithflex/MapServer"/>
</esri:Map>

</s:Application>

Any suggestion

Regards
Nadeem
Tags (2)
0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Emeritus
Nadeem,

   Te reason it is not working is that you are not providing the REST url for your service...

<esri:ArcGISTiledMapServiceLayer url="http://localhost/ArcGIS_server/rest/services/testwithflex/MapServer"/>


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:
0 Kudos
NadeemQazi
Regular Contributor
Nadeem,

   Te reason it is not working is that you are not providing the REST url for your service...

<esri:ArcGISTiledMapServiceLayer url="http://localhost/ArcGIS_server/rest/services/testwithflex/MapServer"/>


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow the steps as shown in the below graphic:


thnx rscheitlin , however i would appreciate if you can kindly also guide how to provide rest URL , I had copied that URL from server please let me know what is missing
Regards
NAdeem
0 Kudos
NadeemQazi
Regular Contributor
thnx rscheitlin , however i would appreciate if you can kindly also guide how to provide rest URL , I had copied that URL from server please let me know what is missing
Regards
NAdeem


thnx i understand it now and it works
thank you
Regards
Nadeem
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Nadeem,

   You get the REST Url by going to the REST Service directory for your server.

http://localhost/ArcGIS_server/rest/services
0 Kudos