Select to view content in your preferred language

map initialextent

928
6
07-28-2010 05:29 AM
JeremyCoulson
Occasional Contributor
Greetings!  Please bear with me as I'm an extreme newbie to GIS stuff.  I am working with the Flex API and following the tutorial.  I'm trying to change the initialextent of the map element to show our county.  The extent numbers I have gotten from ArcMap are in the image:



When I plug those in, I find myself zoomed all the way in to some place in the middle of Russia.

<map initialextent="11470347 7217012.5 11615122 7050199">


Am I using the wrong set of numbers?  Am I putting them in the wrong order?  Again, I'm quite new to working with GIS, so please be as simple as you think you need to be. 

Thanks!

Jeremy
Tags (2)
0 Kudos
6 Replies
RobertScheitlin__GISP
MVP Emeritus
Jeremy,

   You want to use the initial and full extent info fro the REST Service Directory. So open a web browser and type in http://YourArcGISServerName/ArcGIS/rest/services and then choose the map service and get the initial and full extent values from that web page.
0 Kudos
JeremyCoulson
Occasional Contributor
Hello, Robert!  Thanks for the insight.  I was able to find our map services and the extents you mentioned. 

<map initialextent="11428023.5620323 7044712.37840232 11661407.1864131 7229241.03074607" fullextent="11282090.75 6883424.125 11723944.25 7320825.375">


That code still puts me in the middle of Russia.  Should I also be changing something in the <basemaps><mapservice> elements?

Jeremy
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Jeremy,

   Sound like you are mixing ESRI's WGS1984 or WebMercator Base maps and your own stateplane or UTM mapservices. This is possible if your map services are added as dynamic and not tiled. Can you post your config.xml?
0 Kudos
JeremyCoulson
Occasional Contributor
Robert!  Apparently I was.  I commented out all of the default ESRI services included with Flex Viewer and pasted in a few of our own.  Right now I have this:

<!--<map initialextent="11470347 7217012.5 11615122 7050199">-->
 <map initialextent="11428023.5620323 7044712.37840232 11661407.1864131 7229241.03074607" fullextent="11282090.75 6883424.125 11723944.25 7320825.375">
 <!--<map initialextent="-78.544234 39.46519 -78.03177 39.008132">-->
        <basemaps>
            <!--<mapservice label="Streets" type="tiled" visible="false"  alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>-->
   <mapservice label="Frederick County" type="dynamic" visible="true" alpha="1"
      url="http://gis1.co.frederick.va.us/ArcGIS/rest/services/Publicsite/MapServer" />
            <!--<mapservice label="Aerial"  type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
            <mapservice label="Topo"    type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>-->
        </basemaps>
        <operationallayers>
            <!--<layer label="Boundaries and Places" type="tiled" visible="false"
                   url="http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/>
            <layer label="Fires" type="feature" visible="false" alpha="1"
                   info="widgets/InfoTemplates/SimpleInfoWinWidget.swf"
                   infoconfig="widgets/InfoTemplates/IWT_Fires.xml"
                   url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"/>-->
        </operationallayers>
    </map>


You see I commented out a LOT of stuff.  We now get the image of our county like we wanted.  Success!  I cannot give you a link to it because it's internal only at the moment, but here's a screen shot:



So, could you direct me where to go next?  For example, if I search for an address, the application seems to zoom in to an address, but it's all just gray.  I'm assuming this is because I need to specify some layers.  I just don't know what to tell my friend in GIS to supply me with next.

Any direction will be deeply appreciated as I embark on this new challenge.  Thanks!

Jeremy
0 Kudos
DrewDowling
Frequent Contributor
Jeremy

is your map service http://gis1.co.frederick.va.us/ArcGIS/rest/services/Publicsite/MapServer, tiled or dynamic? If it is tiled then the results of your geocoding could be zooming the map to a scale larger than the cached scales.

What also might be happening is you are using geocoding service set up in a different projection system and the resulting point is again somewhere in the middle of Russia.

Drew
0 Kudos
JeremyCoulson
Occasional Contributor
Hey Drew!  I had figured out that I needed to switch to dynamic.  There's so much to learn and I know next to nothing about GIS.

Thanks!

Jeremy
0 Kudos