[fusion-users] Newbie question: problem parsing Application Definition

Richard Turner richardt at mediatel.co.uk
Fri Sep 30 09:34:26 EDT 2011


Hi Paul,

On 30/09/11 12:55, Paul Spencer wrote:
> * what version of fusion are you using?  (i.e. did you download a zip or
> are you using svn trunk etc)

I downloaded a zip of 2.2.0.

> * we will need to see your ApplicationDefinition.xml file
>

Well, I've no idea what I changed, which is pretty irritating, but I'm 
getting a map now, albeit without any controls. It seemed to start 
working after I moved some lines around in Xml2JSON.php, but having 
reverted all my changes (by deleting the whole of Fusion and unzipping a 
new copy) and deleting temporary map images it still works. Very weird, 
but clearly PEBKAC. Here's the XML though, just for completeness:

<?xml version="1.0" encoding="UTF-8"?>
<ApplicationDefinition 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xsi:noNamespaceSchemaLocation="ApplicationDefinition-1.0.0.xsd">
   <MapSet xsi:type="MapSetType">x
     <MapGroup id="mapserver" xsi:type="MapType">

       <Map xsi:type="MapLayerType">
         <Type>MapServer</Type>
         <SingleTile>true</SingleTile>
         <Extension>
           <MapFile>/path/to/gmap75.map</MapFile>
         </Extension>
       </Map>

     </MapGroup>
   </MapSet>

   <WidgetSet xsi:type="WidgetSetType">

      <MapWidget xsi:type="WidgetType">
       <Name>Map</Name>
       <Type>Map</Type>
       <StatusItem>The map.</StatusItem>
       <MapId>mapserver</MapId>
     </MapWidget>

   <Widget xsi:type="UiWidgetType">
       <Name>Pan</Name>
       <Type>Pan</Type>
       <Description>Drag the map to view areas out of range.</Description>
       <ImageUrl>icons/pan.png</ImageUrl>
       <ImageClass/>
       <Tooltip>Pan mode</Tooltip>
       <Label/>
       <Disabled/>
   </Widget>

   <Widget xsi:type="UiWidgetType">
     <Name>ZoomIn</Name>
     <Type>Zoom</Type>
     <Description>Zoom</Description>
     <ImageUrl>icons/zoom-in.png</ImageUrl>
     <ImageClass/>
     <Tooltip>ZoomIn Mode</Tooltip>
     <Label/>
     <Disabled/>
     <Extension xsi:type="CustomContentType">
         <Tolerance>5</Tolerance>
         <Factor>2</Factor>
	</Extension>
   </Widget>

  <Widget xsi:type="UiWidgetType">
     <Name>ZoomOut</Name>
     <Type>Zoom</Type>
     <Description>Zoom</Description>
     <ImageUrl>icons/zoom-out.png</ImageUrl>
     <ImageClass/>
     <Tooltip>ZoomOut Mode</Tooltip>
     <Label/>
     <Disabled/>
     <Extension xsi:type="CustomContentType">
         <Tolerance>5</Tolerance>
         <Factor>2</Factor>
         <Direction>out</Direction>
       </Extension>
   </Widget>

   <Widget xsi:type="WidgetType">
     <Name>Legend</Name>
     <Type>Legend</Type>
     <StatusItem/>
   </Widget>

   </WidgetSet>
   <Extension/>
</ApplicationDefinition>

> The round trip for ApplicationDefinition.xml is a known problem, it is
> there for historical reasons and there is a mechanism for avoiding it by
> pre-compiling your application, which does a number of things.  You seem
> willing to look at the code (which is great!), I suggest that you look
> at the build.xml ANT script to see what happens when you compile an
> application.

OK, that sounds like a good path to start down. Having just started with 
the tutorial I haven't read much documentation yet (I'd hoped that the 
tutorial would work without needing to), so I didn't know one could 
compile an app. Since the other issues I'm seeing, like 
fusion/jx/css/jxskin-graphic.css being missing, are probably owing to an 
out-of-date tutorial rather than a Fusion problem, I think I'll stop 
here and do some reading.

Thanks for your reply, and the hint about compiling an app.

Cheers,
R


More information about the fusion-users mailing list