[mapguide-users] Ajax viewer zoom tool
Kenneth, GEOGRAF A/S
ks at geograf.dk
Wed Dec 19 05:36:40 EST 2007
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*",10000],UNIT["Meter",
1],AXIS["X",EAST],AXIS["Y",NORTH]]</CoordinateSystem>
<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>
Regards, Kenneth, GEOGRAF A/S
BruceWeston skrev:
> By this I mean the Nearest Zoom In, the Farthest Zoom Out and the Total
> Number of scales.
>
> Anyone?
>
>
More information about the mapguide-users
mailing list