API for Flex tutorial

3302
8
Jump to solution
02-13-2014 07:36 AM
DustinHolt
Occasional Contributor
I'm doing a tutorial on the API for Flex using flash builder and I'm having a problem. In this exercise I'm creating a cached map service with a tiled map service as the base map, and setting the extent. I have followed the tutorial to the tea, but I keep getting "Object is not assigned". Can anyone see where I'm going wrong.
0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable
Original User: rscheitlin

Dustin,

   You will notice (upon close observation) that the changes I indicated are included in the exercise steps.

and give it an ???id??? of ???louisville???.


load="{map.extent = louisville.fullExtent}"


Flex is a case sensitive language so you have to be very cautious of that fact.

View solution in original post

0 Kudos
8 Replies
by Anonymous User
Not applicable
Original User: ad_giles@hotmail.com

Dustin,

I cannot see where the louisville extent is being set, try removing the load="map.extent = louisville.fullextent"

Regards

Anthony
0 Kudos
DustinHolt
Occasional Contributor
It works now, I don't now why they tried to do it that way. Thanks
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Dustin,

  Where is this Flex Tutorial located?

If your code looks like this it works fine:

<?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/mx"
               xmlns:esri="http://www.esri.com/2008/ags"
               minWidth="955" minHeight="600">
    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <esri:Map id="map">
        <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"/>
        <esri:ArcGISDynamicMapServiceLayer id="louisville" url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer" load="{map.extent = louisville.fullExtent}"/>
    </esri:Map>        
</s:Application>
0 Kudos
DustinHolt
Occasional Contributor
Here is a PDF of the exercise.
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Dustin,

   You will notice (upon close observation) that the changes I indicated are included in the exercise steps.

and give it an ???id??? of ???louisville???.


load="{map.extent = louisville.fullExtent}"


Flex is a case sensitive language so you have to be very cautious of that fact.
0 Kudos
DustinHolt
Occasional Contributor
I found where I went wrong now. I had the "load="{map.extent = louisville.fullExtent}"/>" as a separate line, when it should have been a part of the "<esri:ArcGISDynamicMapServiceLayer" line.

Thanks Robert
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Dustin,

   I went back and returned the answer credit to Anthony as he was the one that originally answered your question. I just wanted to add additional questions and comments, not take his points.
0 Kudos
DustinHolt
Occasional Contributor
Yes, Thanks Anthony.
0 Kudos