Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am trying to "force" ArcGIS Viewer for Flex 2.1 to retrieve WMS layer using an EPSG, i.e. 3308.

I tried setting

 <map wkid="3308">

However the ArcGIS Viewer for flex always defaults to 4326, unless I include the default basemap, in which case the SRS in WMS http request is 12100 (or something similar)

<basemaps>
        <layer label="Streets" type="tiled" visible="false"
               url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>

So how do I display other WMS with EPSG 3308 ?

share|improve this question
    
If you are using a WMS service, why are you using the layer class? why not the WMSLayer class? And as far as I know, if you use the above URl, it will be accessed as a cached mapservice, not a dynamic mapservice. This has problems when projecting on the fly –  Devdatta Tengshe Jul 14 '11 at 14:22
    
@devdatta From help.arcgis.com/en/webapps/flexviewer/help/#/… , there isn't wmslayer available. –  portoalet Jul 18 '11 at 5:57
add comment

3 Answers

Have you looked at the sample on help.arcgis.com?
Look in flex api and then the mapping category there is a "mapextent in different projection"

NOTE: I am in need of this solution, but as of yet unable to get it to work.

share|improve this answer
add comment

The following code works for me, when I am using either a Dynamic Mapservice, or a cached Mapservice.

<esri:Map id="map" units="{Units.METERS}" x="10" y="100">
        <esri:extent>
        <esri:Extent xmin="9524333" ymin="4464948" xmax="9554029" ymax="4491455" >
            <esri:SpatialReference wkid="3308" />
            </esri:Extent>
        </esri:extent>
        <esri:ArcGISDynamicMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" />
    </esri:Map>

I do not have a WMS service to test on. Also note that I am using the 2.3.1 release of the ArcGIS Flex API.

share|improve this answer
    
I am begining to wonder if the option for basemap layers and operational layers is where the problem lies. I have yet to see a solution that sets the spatialReference for the map to that of the operational layer and still allow the basemap layer to be aux web mercator (as in bing from arcgisonline) –  Brad Nesom Jul 14 '11 at 16:39
add comment

You have to specify an initial extent AND a wkid

<map wraparound180="true" initialextent="8713300 4022870 9965500 5046020" wkid="3308" top="40">
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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