Problem with measure in the draw and measure widget

1107
12
08-23-2012 11:00 PM
KlasÖstergren
New Contributor III
I use the flex viewer 3.0 and the application builder. Now I have a problem with the measure function in the draw and measure widget. When i check the show measurements box and draw a line I get a white box without any message. Does anyone has any idea what causes the problem?

My xml-file
<?xml version="1.0" ?>
<configuration>
    <distanceunits>
        <distanceunit abbr="km" conversion="0.001">Kilometers</distanceunit>
        <distanceunit abbr="m" conversion="1">Meters</distanceunit>
    </distanceunits>
    <areaunits>
        <areaunit abbr="km2" conversion="0.000001">Square kilometers</areaunit>
        <areaunit abbr="ha" conversion="0.0001">Hectares</areaunit>
        <areaunit abbr="m2" conversion="1">Square meters</areaunit>
    </areaunits>
</configuration>
0 Kudos
12 Replies
by Anonymous User
Not applicable
Original User: GISProgrammer9

Have you tried it with the default .xml that comes with the widget with no changes to narrow it down and see if your .xml is the problem or not?
0 Kudos
KlasÖstergren
New Contributor III
Have you tried it with the default .xml that comes with the widget with no changes to narrow it down and see if your .xml is the problem or not?


Yes, I have tried with the default file
0 Kudos
by Anonymous User
Not applicable
Original User: GISProgrammer9

What is the size of your DrawWidget.swf in ..\widgets\Draw ?
0 Kudos
KlasÖstergren
New Contributor III
What is the size of your DrawWidget.swf in ..\widgets\Draw ?


The swf file is 81kB
0 Kudos
by Anonymous User
Not applicable
Original User: GISProgrammer9

The swf file is 81kB



Can you post up your config.xml section that shows all of your widgets. Are you doing all of this with only the Application Builder? Maybe try downloading the compiled Flexviewer too and try that DrawWidget.swf and DrawWidget.xml if yours isn't working.
0 Kudos
KlasÖstergren
New Contributor III
Here is my config.xml

<?xml version="1.0" ?>
<configuration>
    <title>My Map</title>
    <logo>assets/images/logo.jpg</logo>
    <style>
        <colors>0x0,0xffffff,0xffffff,0xffffff,0xcc0000</colors>
        <alpha>0.8</alpha>
        <font name="Arial"/>
        <titlefont name="Verdana"/>
        <subtitlefont name="null"/>
    </style>
    <!-- replace the following url with your own geometryservice -->
    <geometryservice url="http://my-server/ArcGIS/services/Geometry/GeometryServer" useproxy="false"/>
    <widgetcontainer layout="float">
        <widget url="widgets/Bookmark/BookmarkWidget.swf" config="widgets/Bookmark/BookmarkWidget_1.xml" label="Bookmark" icon="assets/images/i_bookmark.png"/>
        <widget icon="assets/images/i_draw2.png" label="Draw and Measure" config="widgets/Draw/DrawWidget.xml" url="widgets/Draw/DrawWidget.swf"/>
        <widget icon="assets/images/i_print.png" label="Print" config="widgets/Print/PrintWidget.xml" url="widgets/Print/PrintWidget.swf"/>
    </widgetcontainer>
    <widget url="widgets/Navigation/NavigationWidget.swf" config="widgets/Navigation/NavigationWidget.xml" left="10" top="50"/>
    <widget url="widgets/OverviewMap/OverviewMapWidget.swf" config="widgets/OverviewMap/OverviewMapWidget.xml" right="-2" bottom="-2"/>
    <widget url="widgets/MapSwitcher/MapSwitcherWidget.swf" config="widgets/MapSwitcher/MapSwitcherWidget.xml" right="20" top="55"/>
    <widget url="widgets/HeaderController/HeaderControllerWidget.swf" config="widgets/HeaderController/HeaderControllerWidget.xml" left="0" top="0"/>
    <widget url="widgets/Coordinate/CoordinateWidget.swf" config="widgets/Coordinate/CoordinateWidget.xml" label="Coordinate" icon="assets/images/i_globe.png" left="3" bottom="3"/>
    <map esrilogovisible="false" openhandcursorvisible="false" scalebarvisible="true" zoomslidervisible="false" wraparound180="true" addarcgisbasemaps="false" initialextent="115293.67509267754 6440409.166357804 203823.43548553332 6489847.863720048" wkid="3009" top="40">
        <basemaps>
            <layer type="dynamic" label="Basemap1" url="http://my-server/ArcGIS/rest/services/Basemaps/Basemap1/MapServer" visible="true"/>
            <layer type="dynamic" label="Basemap2" url="http://my-server/ArcGIS/rest/services/Basemaps/Basemap1/MapServer" visible="false"/>
            <layer type="dynamic" label="Basemap3" url="http://my-server/ArcGIS/rest/services/Basemaps/Basemap1/MapServer" visible="false"/>
        </basemaps>
        <operationallayers>
            <layer type="dynamic" label="Layer1" url="http://my-server/ArcGIS/rest/services/Layer1/MapServer" visible="true">
                <sublayer id="1" popupconfig="popups/PopUp_3.xml"/>
            </layer>
            </operationallayers>
    </map>
</configuration>


I have downloaded the compiled Flexviewer and tested this with the default configuration. That works fine. Could the problem be related to my basemaps? In my maps I use EPSG:3009 as coordinate system. Could that cause the problem?
0 Kudos
by Anonymous User
Not applicable
Original User: keoe

Bump...

Does anyone have any idea what is causing my problem? I have tried to use a basemap in WGS84 and then the measurement works fine. I have seen flexviewers from other organisations that use other coordinatesystem then WGS84. In this the measure works.
0 Kudos
KlasÖstergren
New Contributor III
I have try to change geometry service in the config.xml to this from ArcGIS Online: http://tasks.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer. Now the measure works fine. Does anyone have an idea what's wrong with my own geometry service?
0 Kudos
by Anonymous User
Not applicable
Original User: rscheitlin

Klas,

   Have you checked to that your geometry service is started (0r even exists) using ArcGIS Server Manager?
0 Kudos