[fusion-commits] r2799 - in trunk/widgets: Redline Redline/classes widgetinfo
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Sun Nov 3 18:40:33 PST 2013
Author: liuar
Date: 2013-11-03 18:40:33 -0800 (Sun, 03 Nov 2013)
New Revision: 2799
Modified:
trunk/widgets/Redline/classes/markupmanager.php
trunk/widgets/Redline/editmarkup.php
trunk/widgets/Redline/editmarkupstyle.php
trunk/widgets/Redline/markupmain.php
trunk/widgets/Redline/uploadmarkup.php
trunk/widgets/widgetinfo/redline.xml
Log:
#602: Fix error when downloading redline as KML/KMZ format.
This submission also refined the php files using tag <?php instead of <?.
Modified: trunk/widgets/Redline/classes/markupmanager.php
===================================================================
--- trunk/widgets/Redline/classes/markupmanager.php 2013-10-18 06:31:31 UTC (rev 2798)
+++ trunk/widgets/Redline/classes/markupmanager.php 2013-11-04 02:40:33 UTC (rev 2799)
@@ -824,8 +824,12 @@
//View extent crunching time
$geomFact = new MgGeometryFactory();
$csFactory = new MgCoordinateSystemFactory();
- $mapCs = $csFactory->Create($map->GetMapSRS());
- $metersPerUnit = $mapCs->ConvertCoordinateSystemUnitsToMeters(1.0);
+ $metersPerUnit = 1.0;
+ if ($map->GetMapSRS() != null)
+ {
+ $mapCs = $csFactory->Create($map->GetMapSRS());
+ $metersPerUnit = $mapCs->ConvertCoordinateSystemUnitsToMeters(1.0);
+ }
$mapScale = $map->GetViewScale();
$devW = $map->GetDisplayWidth();
$devH = $map->GetDisplayHeight();
Modified: trunk/widgets/Redline/editmarkup.php
===================================================================
--- trunk/widgets/Redline/editmarkup.php 2013-10-18 06:31:31 UTC (rev 2798)
+++ trunk/widgets/Redline/editmarkup.php 2013-11-04 02:40:33 UTC (rev 2799)
@@ -546,10 +546,10 @@
<input name="EDITCOMMAND" type="hidden" value="" id="commandInput">
<input name="GEOMETRY" type="hidden" value="" id="geometryInput">
<input name="TEXT" type="hidden" value="" id="textInput">
-<? if ($defaultFormat != null && $defaultGeomType != null) { ?>
+<?php if ($defaultFormat != null && $defaultGeomType != null) { ?>
<input name="REDLINEFORMAT" type="hidden" value="<?= $defaultFormat ?>" />
<input name="REDLINEGEOMTYPE" type="hidden" value="<?= $defaultGeomType ?>" />
-<? } ?>
+<?php } ?>
<input name="REDLINESTYLIZATION" type="hidden" value="<?= $args['REDLINESTYLIZATION'] ?>">
</form>
<?php } else { ?>
Modified: trunk/widgets/Redline/editmarkupstyle.php
===================================================================
--- trunk/widgets/Redline/editmarkupstyle.php 2013-10-18 06:31:31 UTC (rev 2798)
+++ trunk/widgets/Redline/editmarkupstyle.php 2013-11-04 02:40:33 UTC (rev 2799)
@@ -228,11 +228,11 @@
function Cancel()
{
- <? if ($defaultFormat != null && $defaultGeomType != null) { ?>
+ <?php if ($defaultFormat != null && $defaultGeomType != null) { ?>
window.location.href="markupmain.php?SESSION=<?= $args['SESSION']?>&MAPNAME=<?= $args['MAPNAME']?>&REDLINESTYLIZATION=<?= $args['REDLINESTYLIZATION'] ?>&REDLINEFORMAT=<?= $defaultFormat ?>&REDLINEGEOMTYPE=<?= $defaultGeomType ?>";
- <? } else { ?>
+ <?php } else { ?>
window.location.href="markupmain.php?SESSION=<?= $args['SESSION']?>&MAPNAME=<?= $args['MAPNAME']?>&REDLINESTYLIZATION=<?= $args['REDLINESTYLIZATION'] ?>";
- <? } ?>
+ <?php } ?>
}
</script>
@@ -252,10 +252,10 @@
<input name="MARKUPLAYERNAME" type="hidden" value="<?= $args['MARKUPLAYERNAME'] ?>">
<input name="REDLINESTYLIZATION" type="hidden" value="<?= $args['REDLINESTYLIZATION'] ?>">
-<? if ($defaultFormat != null && $defaultGeomType != null) { ?>
+<?php if ($defaultFormat != null && $defaultGeomType != null) { ?>
<input name="REDLINEFORMAT" type="hidden" value="<?= $defaultFormat ?>" />
<input name="REDLINEGEOMTYPE" type="hidden" value="<?= $defaultGeomType ?>" />
-<? } ?>
+<?php } ?>
<table class="RegText" border="0" cellspacing="0" width="100%%">
<tr><td id="elTitle" colspan="2" class="Title"><?= $editLayerStyleLocal ?><hr></td></tr>
@@ -368,7 +368,7 @@
</td>
<td width="50%">
<?=$fillTransparencyLocal?><br>
- <input class="Ctrl" name="FILLTRANSPARENCY" type="text" maxlength="3" value="<? $style->FILL_TRANSPARENCY ?>" style="width:50px">%
+ <input class="Ctrl" name="FILLTRANSPARENCY" type="text" maxlength="3" value="<?php $style->FILL_TRANSPARENCY ?>" style="width:50px">%
</td>
</tr>
<tr>
Modified: trunk/widgets/Redline/markupmain.php
===================================================================
--- trunk/widgets/Redline/markupmain.php 2013-10-18 06:31:31 UTC (rev 2798)
+++ trunk/widgets/Redline/markupmain.php 2013-11-04 02:40:33 UTC (rev 2799)
@@ -178,9 +178,9 @@
function GetGeometryTypes()
{
- <? if ($defaultFormat != null && $defaultGeomType != null) { ?>
+ <?php if ($defaultFormat != null && $defaultGeomType != null) { ?>
return <?= $defaultGeomType ?>;
- <? } else { ?>
+ <?php } else { ?>
var geomType = 0;
var bPoint = document.getElementById("chkPoint").checked;
var bLine = document.getElementById("chkLine").checked;
@@ -194,7 +194,7 @@
geomType |= GEOM_POLY;
return geomType;
- <? } ?>
+ <?php } ?>
}
function GetFdoProvider(cmd)
@@ -356,12 +356,12 @@
function CheckApplicableProviders()
{
- <? if ($defaultFormat == null || $defaultGeomType == null) { ?>
+ <?php if ($defaultFormat == null || $defaultGeomType == null) { ?>
var gt = GetGeometryTypes();
document.getElementById("newShpBtn").disabled = (gt != GEOM_POINT && gt != GEOM_LINE && gt != GEOM_POLY);
document.getElementById("newSdfBtn").disabled = (gt == 0);
document.getElementById("newSqliteBtn").disabled = (gt == 0);
- <? } ?>
+ <?php } ?>
}
function OnLoad()
@@ -375,9 +375,9 @@
map.reloadMap();
<?php } ?>
- <? if ($defaultFormat != null && $defaultGeomType != null && $createOnStartup == true) { ?>
+ <?php if ($defaultFormat != null && $defaultGeomType != null && $createOnStartup == true) { ?>
SubmitCreateCommand(<?= $defaultCmd ?>, <?= $defaultGeomType ?>);
- <? } ?>
+ <?php } ?>
}
</script>
@@ -389,13 +389,13 @@
<table class="RegText" border="0" cellspacing="0" width="100%">
<tr><td class="Title"><?=$manageLocal?><hr></td></tr>
<tr><td class="SubTitle"><?=$newRedlineLayerLocal?></td></tr>
- <? if ($defaultCmd != null && $defaultGeomType != null) { ?>
+ <?php if ($defaultCmd != null && $defaultGeomType != null) { ?>
<tr>
<td>
<input class="Ctrl" type="button" id="newBtn" onClick="SubmitCreateCommand(<?= $defaultCmd ?>, <?= $defaultGeomType ?>)" value="<?= $newRedlineLayerLocal ?>" />
</td>
</tr>
- <? } else { ?>
+ <?php } else { ?>
<tr>
<td>
<?=$pointLocal?> <input class="Ctrl" type="checkbox" id="chkPoint" onClick="CheckApplicableProviders()" checked="checked" />
@@ -410,7 +410,7 @@
<input class="Ctrl" type="button" id="newSqliteBtn" onClick="SubmitCreateCommand(CMD_NEW_SQLITE)" value="<?=$newSqliteLocal?>" style="width:95px">
</td>
</tr>
- <? } ?>
+ <?php } ?>
<tr><td class="SubTitle"><?=$availableLayersLocal?></td></tr>
<tr>
<td class="RegText">
@@ -480,11 +480,11 @@
<input name="MARKUPCOMMAND" type="hidden" value="" id="commandInput">
<input name="EDITMARKUPLAYER" type="hidden" value="" id="editMarkupLayerId">
<input name="MARKUPLAYERNAME" type="hidden" value="" id="markupLayerName">
-<? if ($defaultFormat != null && $defaultGeomType != null) { ?>
+<?php if ($defaultFormat != null && $defaultGeomType != null) { ?>
<input name="REDLINEFORMAT" type="hidden" value="<?= $defaultFormat ?>" />
<input name="REDLINEGEOMTYPE" type="hidden" value="<?= $defaultGeomType ?>" />
-<? } ?>
-<input name="REDLINESTYLIZATION" type="hidden" value="<?= $args['REDLINESTYLIZATION'] ?>">
+<?php } ?>
+<input name="REDLINESTYLIZATION" type="hidden" value="<?= $args['REDLINESTYLIZATION'] ?>" />
</form>
<?php } else { ?>
Modified: trunk/widgets/Redline/uploadmarkup.php
===================================================================
--- trunk/widgets/Redline/uploadmarkup.php 2013-10-18 06:31:31 UTC (rev 2798)
+++ trunk/widgets/Redline/uploadmarkup.php 2013-11-04 02:40:33 UTC (rev 2799)
@@ -110,10 +110,10 @@
<input type="hidden" name="MARKUPCOMMAND" id="cmdType" value="<?= MarkupCommand::Upload ?>" />
<input type="hidden" name="MAPNAME" id="MAPNAME" value="<?= $args["MAPNAME"] ?>" />
<input type="hidden" name="SESSION" id="SESSION" value="<?= $args["SESSION"] ?>" />
- <? if ($defaultFormat != null && $defaultGeomType != null) { ?>
+ <?php if ($defaultFormat != null && $defaultGeomType != null) { ?>
<input name="REDLINEFORMAT" type="hidden" value="<?= $defaultFormat ?>" />
<input name="REDLINEGEOMTYPE" type="hidden" value="<?= $defaultGeomType ?>" />
- <? } ?>
+ <?php } ?>
<input name="REDLINESTYLIZATION" type="hidden" value="<?= $args['REDLINESTYLIZATION'] ?>">
</td>
</tr>
Modified: trunk/widgets/widgetinfo/redline.xml
===================================================================
--- trunk/widgets/widgetinfo/redline.xml 2013-10-18 06:31:31 UTC (rev 2798)
+++ trunk/widgets/widgetinfo/redline.xml 2013-11-04 02:40:33 UTC (rev 2799)
@@ -101,7 +101,7 @@
<Name>StylizationType</Name>
<Description>Determines which type of stylization to use for rendering redline features.</Description>
<Type>string</Type>
- <Label>RedlineGeometryFormat</Label>
+ <Label>StylizationType</Label>
<AllowedValue>
<Name>basic</Name>
<Label>Basic Stylization</Label>
@@ -110,7 +110,6 @@
<Name>advanced</Name>
<Label>Advanced (Composite) Stylization</Label>
</AllowedValue>
- <Label>StylizationType</Label>
<DefaultValue>basic</DefaultValue>
<IsMandatory>false</IsMandatory>
</Parameter>
More information about the fusion-commits
mailing list