1

I followed the example from ArcGIS resource center website: https://developers.arcgis.com/flex/ to create a map, unfortunately after I run the flex builder application, the map does not appear. The following is my code and what happens after running the application. What's wrong with my project? I have tried to use IE, Chrome and Firefox to open the url, but the result is the same:

<?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">

<esri:Map level="3" wrapAround180="true">
    <esri:center>
        <esri:WebMercatorMapPoint lon="0" lat="0"/>
    </esri:center>
    <esri:ArcGISTiledMapServiceLayer
        url="http://server.arcgisonline.com/ArcGIS/rest/services/
        World_Street_Map/MapServer"/>
    <esri:ArcGISDynamicMapServiceLayer
        url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/
        Demographics/ESRI_Population_World/MapServer" 
        alpha=".70"/>
 </esri:Map>

</s:Application>

enter image description here

1

Keep the value of url for ArcGISTiledMapServiceLayer and ArcGISDynamicMapServiceLayer in a single line. Like url="url_value_in_sigle_line"

<?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">

    <esri:Map level="3" wrapAround180="true">
        <esri:center>
            <esri:WebMercatorMapPoint lon="0" lat="0"/>
        </esri:center>
        <esri:ArcGISTiledMapServiceLayer
            url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
        <esri:ArcGISDynamicMapServiceLayer
            url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer"
            alpha=".70"/>
    </esri:Map>
</s:Application>

enter image description here

  • @ppLily: If you accepted this answer then please click green tick next to it. This will reduce the number of unanswered questions. – Surya Aug 28 '14 at 19:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.