17-12-2008, 12:04 PM
Perfect!!!!!! Thanks.
Create new service in FSEarthTiles.ini :
[Service4]
ServiceCodeing = X1Y1X2Y2
ServiceUrl = http://www.idee.es/wms/PNOA/PNOA?REQUEST...:4258&BBOX=%
s&WIDTH=256&HEIGHT=256&LAYERS=pnoa&STYLES=default&FORMAT=image/jpeg
#//EPSG:4258 ETRS89 //EPSG:4230 ED50 //EPSG:4326 WGS80
And Change UseCSharpScripts to Yes.
Modified TileCodeingScript.cs :
public String MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)
{
String vResultCode = "";
if (EarthCommon.StringCompare(iUseCode, "xyz" ) ) // example Service 3 thank's to Steffen I.
{
...
}
else if (EarthCommon.StringCompare(iUseCode, "X1Y1X2Y2" ) ) // examples Services type NPOA (Spanish geografic institute) or
OpenLayers (Provided by MetaCarta, http://openlayers.org/)
{
Double vWestBorderLongitudeOfTile = EarthMath.GetAreaTileLeftLongitude (iAreaCodeX, iAreaCodeLevel);
Double vEastBorderLongitudeOfTile = EarthMath.GetAreaTileRightLongitude (iAreaCodeX, iAreaCodeLevel);
Double vNorthBorderLatitudeOfTile = EarthMath.GetAreaTileTopLatitude (iAreaCodeY, iAreaCodeLevel);
Double vSouthBorderLatitudeOfTile = EarthMath.GetAreaTileBottomLatitude (iAreaCodeY, iAreaCodeLevel);
vResultCode = vWestBorderLongitudeOfTile.ToString().Replace(",", "." ) + "," + vSouthBorderLatitudeOfTile.ToString().Replace
(",", "." ) + "," + vEastBorderLongitudeOfTile.ToString().Replace(",", "." ) + "," + vNorthBorderLatitudeOfTile.ToString().Replace(",", "." );
}
else // Quad mode, examples Services 1 and 2
{
Int64 vSteps = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;
...
}
return vResultCode;
}
Create new service in FSEarthTiles.ini :
[Service4]
ServiceCodeing = X1Y1X2Y2
ServiceUrl = http://www.idee.es/wms/PNOA/PNOA?REQUEST...:4258&BBOX=%
s&WIDTH=256&HEIGHT=256&LAYERS=pnoa&STYLES=default&FORMAT=image/jpeg
#//EPSG:4258 ETRS89 //EPSG:4230 ED50 //EPSG:4326 WGS80
And Change UseCSharpScripts to Yes.
Modified TileCodeingScript.cs :
public String MapAreaCoordToTileCode(Int64 iAreaCodeX, Int64 iAreaCodeY, Int64 iAreaCodeLevel, String iUseCode)
{
String vResultCode = "";
if (EarthCommon.StringCompare(iUseCode, "xyz" ) ) // example Service 3 thank's to Steffen I.
{
...
}
else if (EarthCommon.StringCompare(iUseCode, "X1Y1X2Y2" ) ) // examples Services type NPOA (Spanish geografic institute) or
OpenLayers (Provided by MetaCarta, http://openlayers.org/)
{
Double vWestBorderLongitudeOfTile = EarthMath.GetAreaTileLeftLongitude (iAreaCodeX, iAreaCodeLevel);
Double vEastBorderLongitudeOfTile = EarthMath.GetAreaTileRightLongitude (iAreaCodeX, iAreaCodeLevel);
Double vNorthBorderLatitudeOfTile = EarthMath.GetAreaTileTopLatitude (iAreaCodeY, iAreaCodeLevel);
Double vSouthBorderLatitudeOfTile = EarthMath.GetAreaTileBottomLatitude (iAreaCodeY, iAreaCodeLevel);
vResultCode = vWestBorderLongitudeOfTile.ToString().Replace(",", "." ) + "," + vSouthBorderLatitudeOfTile.ToString().Replace
(",", "." ) + "," + vEastBorderLongitudeOfTile.ToString().Replace(",", "." ) + "," + vNorthBorderLatitudeOfTile.ToString().Replace(",", "." );
}
else // Quad mode, examples Services 1 and 2
{
Int64 vSteps = EarthMath.cLevel0CodeDeep - iAreaCodeLevel;
...
}
return vResultCode;
}