[mapguide-internals] FW: [mapguide-users] Ajax viewer zoom tool
Jason Birch
Jason.Birch at nanaimo.ca
Wed Dec 19 11:41:02 EST 2007
Hmm...
That's unexpected; I wouldn't have expected BaseMapLayerGroup to have a
minOccurs="0". Does this mean that the BaseMapDefinition and its
associated FiniteDisplayScale were intended to constrain the scales of a
map when there are no base map groups defined? If so, wouldn't it make
more sense to have the finite scales as a child of the MapDefinition?
My first though was that this is just an oversight in the AJAX viewer...
Is this something that will work with Fusion (I kind-of doubt it, but
could be surprised)
Jason
-----Original Message-----
From: BruceWeston
Subject: Re: [mapguide-users] Ajax viewer zoom tool
YES!
Well done Kenneth. That's the one. The only thing I thought would be an
issue was that I took out the <BaseMapLayerGroup> and <BaseMapLayer>
from your XML and left in the scales. It now works very smoothly without
that juddery redraw of base layers. I'm able to see the scales in Studio
now even though there are no base layers. Why can't you do that anyway?
Excellent work - you win the cold christmas turkey!
Ross
Kenneth, GEOGRAF A/S wrote:
>
> Not exactly sure that this is what you want, but you can define the
> FinitieDisplayScales manually.
> I have composed the remainder of this mail from a thread with Ori and
> myself:
>
> After saving the map in MapGuide Studio, select the menu "File" and
> "Save as xml..."
> The file it saves is the internal representation of the MapDefinition.
>
> You can open this file with almost any text editor (plain text only,
> no MS Word).
> You can use notepad if you like.
>
> Somewhere in the file will be a an xml entry called
<FiniteDisplayScale>.
> In this entry you can hand modify the scales.
> After you are done, you can reinsert the MapDefintion into the
> MapGuide server.
>
> Open a browser with:
> http://localhost/mapguide/mapagent/index.html
> Select "Resource", the "SetResource"
>
> To the right, enter the resourceID you want to save the map under.
> ea: "Library://my_existing_folder/my_map_name.MapDefinition"
>
> Browse the file as the "Content" item.
> Leave the "Header" blank.
> Press submit.
>
> You will now have updated/create a MapDefintion in the server.
>
>
>
> My Xml looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <MapDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:noNamespaceSchemaLocation="MapDefinition-1.0.0.xsd">
> <Name>Map1</Name>
>
> <CoordinateSystem>LOCAL_CS["*XY-M*",LOCAL_DATUM["*X-Y*&
> quot;,10000],UNIT["Meter",
> 1],AXIS["X",EAST],AXIS["Y",NORTH]]</CoordinateSyst
> em>
> <Extents>
> <MinX>-120579.82007099999</MinX>
> <MaxX>-59179.216927000001</MaxX>
> <MinY>131292.75224649999</MinY>
> <MaxY>186145.6022435</MaxY>
> </Extents>
> <BackgroundColor>00f0f0f0</BackgroundColor>
> <MapLayer>
> <Name>Bygninger</Name>
> <ResourceId>Library://Sample 2.LayerDefinition</ResourceId>
> <Selectable>true</Selectable>
> <ShowInLegend>true</ShowInLegend>
> <LegendLabel>Bygninger</LegendLabel>
> <ExpandInLegend>true</ExpandInLegend>
> <Visible>true</Visible>
> <Group></Group>
> </MapLayer>
> <BaseMapDefinition>
> <FiniteDisplayScale>2.3460388183593799</FiniteDisplayScale>
> <FiniteDisplayScale>9.3841599999999996</FiniteDisplayScale>
> <FiniteDisplayScale>37.536619999999999</FiniteDisplayScale>
> <FiniteDisplayScale>150.14648</FiniteDisplayScale>
> <FiniteDisplayScale>600.58594000000005</FiniteDisplayScale>
> <FiniteDisplayScale>2402.34375</FiniteDisplayScale>
> <FiniteDisplayScale>9609.375</FiniteDisplayScale>
> <FiniteDisplayScale>38437.5</FiniteDisplayScale>
> <FiniteDisplayScale>153750</FiniteDisplayScale>
> <FiniteDisplayScale>615000</FiniteDisplayScale>
> <BaseMapLayerGroup>
> <Name>Base Layer Group</Name>
> <Visible>true</Visible>
> <ShowInLegend>true</ShowInLegend>
> <ExpandInLegend>true</ExpandInLegend>
> <LegendLabel></LegendLabel>
> <BaseMapLayer>
> <Name>Sample layer</Name>
> <ResourceId>Library://Sample layer.LayerDefinition</ResourceId>
> <Selectable>true</Selectable>
> <ShowInLegend>true</ShowInLegend>
> <LegendLabel>Sample layer</LegendLabel>
> <ExpandInLegend>true</ExpandInLegend>
> </BaseMapLayer>
> </BaseMapLayerGroup>
> </BaseMapDefinition>
> </MapDefinition>
More information about the mapguide-internals
mailing list