Select to view content in your preferred language

Adding Own Data to Flex Viewer

1835
18
10-20-2010 03:49 PM
NeilMillward
Regular Contributor
I am trying to add an operational layer of points to the flex viewer. I have added the layer in the config.xml file and I don't get any error messages when the viewer loads, I just don't see any of the points on the map.

I have checked the url to the service and this is working.

My points are in State Plane Projection and the base layers are Web Mercator. Could this be the problem?

Thanks
Tags (2)
0 Kudos
18 Replies
BjornSvensson
Esri Regular Contributor
As long as your MapService is not tiled, then it should work fine with your point data being in a different projection than the base layers.  What does your <layer> tag look like?
0 Kudos
JohnGregorovic
Deactivated User
Can you paste your code?

It could be that the type is wrong  I was using type="feature" and it needed to be type="dynamic"

But without seeing what you have, it's hard to tell.
0 Kudos
NeilMillward
Regular Contributor
It is a dynamic map service. I also added it to the map switcher to see if it worked there and it does.
When I select the CLTies button I am able to see the points but when the Streets button is selected and I check the Centerline Ties box under the "more" button the points do not appear. See code below:

       <basemaps>
           
            <layer label="Streets" type="tiled" visible="true"  alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"/>
            <layer label="Aerial"  type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"/>
            <layer label="Topo"    type="tiled" visible="false" alpha="1"
                        url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
            <layer label="CL Ties"    type="dynamic" visible="false" alpha="1"
                        url="http://gis.cityoforange.org/ArcGIS/rest/services/clTie_index/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/..."/>
            <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"/>
            <layer label="Centerline Ties" type="feature" visible="true" alpha="1"
                   info="widgets/InfoTemplates/SimpleInfoWinWidget.swf"
                   infoconfig="widgets/InfoTemplates/Centerline_Ties.xml"
                   url="http://gis.cityoforange.org/ArcGIS/rest/services/clTie_index/MapServer"/>

        </operationallayers>

Also, when I view the points in the map switcher I cannot get an info window to appear. I created a file named IWT_Centerline_Ties.xml in the InfoTemplates folder.

<?xml version="1.0" ?>
<configuration>
    <fields>CT_NUM,LOCATION,WEBSITE</fields>
    <titlefield>NUM</titlefield>
    <linkfield>WEBSITE</linkfield>
    <datefields></datefields> <!-- field in milliseconds -->
    <zoomscale>24000</zoomscale>
</configuration>

Thanks for your help.
0 Kudos
DasaPaddock
Esri Regular Contributor
For type "feature", the url should be to the layer in the service you want to use. Try setting the url to http://gis.cityoforange.org/ArcGIS/rest/services/clTie_index/MapServer/0
0 Kudos
NeilMillward
Regular Contributor
Thanks,

I have the point layer showing in the viewer but the info window still does not work.

Any help is appreciated.
0 Kudos
DasaPaddock
Esri Regular Contributor
Nothing happens when you click the black circles? I tried the config from above with the change to the url and it seems to be working for me.
0 Kudos
NeilMillward
Regular Contributor
No, nothing happens when I click the black dots.
0 Kudos
DasaPaddock
Esri Regular Contributor
Are you using version 2.1? Do you get any errors when you start the app?
0 Kudos
NeilMillward
Regular Contributor
Yes I am using 2.1 and there are no errors when I run it in either Firefox or IE.
0 Kudos