Listing 2: An example XML implementation which can be validated against your XSD.
<?xml version="1.0" encoding="utf-8"?>
<TileFactories xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance"
xsd:schemaLocation="http://www.ansir.ca/xmlschemas/TileFactories
http://www.ansir.ca/xmlschemas/TileFactories.xsd">
<FactoryName>Default Tile Plugin</FactoryName>
<Description><![CDATA[
<html>
<h3>Hello World - Tile Plugin</h3>
<p>
An Open Street Map XML Data Implementation.
</p>
</html>]]>
</Description>
<Author>Dan Andrews</Author>
<IsProduction>1</IsProduction>
<FactoryInfo>
<MinimumZoomLevel>1</MinimumZoomLevel>
<MaximumZoomLevel>15</MaximumZoomLevel>
<TotalMapZoom>17</TotalMapZoom>
<TileSize>256</TileSize>
<Name>Open Street Map</Name>
<Tooltip>Open Street Map - Street Map Type</Tooltip>
<Credit>OpenStreetMap.org</Credit>
<BuildURLFunction><![CDATA[
function buildURL(x,y,z,totalZoom){
var paramString = (totalZoom-z) + "/" + x + "/" + y + ".png";
var URL_HASH_FACTOR = (Math.sqrt(5)-1)/2;
var product=1;
var urls = ["http://a.tile.openstreetmap.org/",
"http://b.tile.openstreetmap.org/",
"http://c.tile.openstreetmap.org/"];
for(var i=0;i<paramString.length;i++){
product*=paramString.charCodeAt(i)*URL_HASH_FACTOR;
product-=Math.floor(product);
}
var url = urls[Math.floor(product*urls.length)];
return url + paramString;
}
]]></BuildURLFunction>
</FactoryInfo>
</TileFactories>
New on the Java Boutique:
New Review:
Time Management Made Easy with the Quartz Enterprise Job Scheduler
Why not just use the Java timer API? This open source scheduling
API boasts simplicity, ease-of-integration, a well-rounded feature
set, and it's free!
New Applet:
Reverse Complement
Reverse Complement is a simple applet that converts DNA or RNA
sequences into three useful formats.
Elsewhere on internet.com:
WebDeveloper Java
Lots of Java information on webdeveloper.com
WDVL Java
Thorough Java resource at the Web Developer's Virtual Library.
ScriptSearch Java
Hundreds of free Java code files to download.
jGuru: Your View of the Java Universe
Customizable portal with online training, FAQs, regular news updates, and tutorials.
|