<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi GeoExt-List,<br>
First my workbench: GeoServer Stable 2.0.2, GeoExt 1.0, OpenLayers
2.8, geoserver-2.0.3-SNAPSHOT-printing-plugin<br>
<br>
1. if i browse to <span><a moz-do-not-send="true">"http://localhost/geoserver/pdf/info.json?var=printCapabilities</a></span>",
i retrieve an info.json with this content:<br>
<br>
printCapabilities={"scales":[{"name":"1:25.000","value":"25000"},{"name":"1:50.000","value":"50000"},{"name":"1:100.000","value":"100000"},{"name":"1:200.000","value":"200000"},{"name":"1:500.000","value":"500000"},{"name":"1:1.000.000","value":"1000000"},{"name":"1:2.000.000","value":"2000000"},{"name":"1:4.000.000","value":"4000000"}],"dpis":[{"name":"75","value":"75"},{"name":"150","value":"150"},{"name":"300","value":"300"}],"layouts":[{"name":"A4
portrait","map":{"width":440,"height":483},"rotation":true},{"name":"Legal","map":{"width":440,"height":483},"rotation":false}],"printURL":<a
class="moz-txt-link-rfc2396E"
href="http://localhost/geoserver/pdf/print.pdf">"http://localhost/geoserver/pdf/print.pdf"</a>,"createURL":<a
class="moz-txt-link-rfc2396E"
href="http://localhost/geoserver/pdf/create.json">"http://localhost/geoserver/pdf/create.json"</a>};<br>
<br>
2. My config.yaml includes <br>
- !dnsMatch<br>
host: tile.openstreetmap.org<br>
port: 80 <br>
<br>
3. Trying to get the GeoExt: "print-preview-osm.html" to work... an
Error appears:<br>
Error while generating PDF:
DocumentException: org.mapfish.print.InvalidJsonValueException:
spec.layers[0].baseURL has an invalid value:
<a class="moz-txt-link-freetext" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a> (spec.layers[0].baseURL has an
invalid value: <a class="moz-txt-link-freetext" href="http://tile.openstreetmap.org/">http://tile.openstreetmap.org/</a>) at
org.mapfish.print.map.readers.HTTPMapReader.checkSecurity(HTTPMapReader.java:64)
at
org.mapfish.print.map.readers.HTTPMapReader.<init>(HTTPMapReader.java:55)
at
org.mapfish.print.map.readers.TileableMapReader.<init>(TileableMapReader.java:40)
at
org.mapfish.print.map.readers.OsmMapReader.<init>(OsmMapReader.java:41)
at
org.mapfish.print.map.readers.OsmMapReader.create(OsmMapReader.java:78)
[...]<br>
<br>
<br>
4. If i skip the OpenLayers.Layer.OSM() and Add for example
OpenLayers.Layer.WMS("Global Imagery",
<a class="moz-txt-link-rfc2396E" href="http://labs.metacarta.com/wms/vmap0">"http://labs.metacarta.com/wms/vmap0"</a>, {layers: "basic"});
Everything, works fine!<br>
<br>
<br>
Thanks for any Help, Best regards<br>
Simon Appelt<br>
<br>
Am 07.03.2011 00:40, schrieb Andrew Parker:
<blockquote cite="mid:4D741B5F.7050601@source3.com" type="cite">
<pre wrap="">And to those who is following, here is the complete SLD for GeoServer
2.0.2 for reference:
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0"
xmlns=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/sld">"http://www.opengis.net/sld"</a> xmlns:ogc=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/ogc">"http://www.opengis.net/ogc"</a>
xmlns:xlink=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/1999/xlink">"http://www.w3.org/1999/xlink"</a>
xmlns:xsi=<a class="moz-txt-link-rfc2396E" href="http://www.w3.org/2001/XMLSchema-instance">"http://www.w3.org/2001/XMLSchema-instance"</a>
xsi:schemaLocation=<a class="moz-txt-link-rfc2396E" href="http://www.opengis.net/sldhttp://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">"http://www.opengis.net/sld
http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd"</a>>
<NamedLayer>
<Name>USGS GW Elev</Name>
<UserStyle>
<Title>USGS GW Elev</Title>
<Abstract>Groundwater elevation, feet mean sea level</Abstract>
<FeatureTypeStyle>
<!--FeatureTypeName>Feature</FeatureTypeName-->
<Rule>
<Name>GW Elev (ft msl)</Name>
<MaxScaleDenominator>90e6</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>triangle</WellKnownName>
<Fill>
<CssParameter name="fill">#ff0000</CssParameter>
</Fill>
</Mark>
<Size>9</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
<FeatureTypeStyle>
<Rule>
<MaxScaleDenominator>150000</MaxScaleDenominator>
<TextSymbolizer>
<Label>
<ogc:Function name="if_then_else">
<ogc:Function name="isNull">
<ogc:PropertyName>gwelevft</ogc:PropertyName>
</ogc:Function>
<ogc:Literal></ogc:Literal>
<ogc:Function name="numberFormat">
<ogc:Literal>#.#</ogc:Literal>
<ogc:PropertyName>gwelevft</ogc:PropertyName>
</ogc:Function>
</ogc:Function>
</Label>
<Font>
<CssParameter name="font-family">Arial</CssParameter>
<CssParameter name="font-size">08</CssParameter>
<CssParameter name="font-style">normal</CssParameter>
<CssParameter name="font-weight">bold</CssParameter>
</Font>
<LabelPlacement>
<PointPlacement>
<AnchorPoint>
<AnchorPointX>0</AnchorPointX>
<AnchorPointY>0.5</AnchorPointY>
</AnchorPoint>
<Displacement>
<DisplacementX>
7
</DisplacementX>
<DisplacementY>
0
</DisplacementY>
</Displacement>
</PointPlacement>
</LabelPlacement>
<Halo>
<Radius>2</Radius>
<Fill>
<CssParameter name="fill">#FFFFFF</CssParameter>
</Fill>
</Halo>
<Fill>
<CssParameter name="fill">#ff0000</CssParameter>
</Fill>
<VendorOption name="autoWrap">60</VendorOption>
<VendorOption name="maxDisplacement">150</VendorOption>
</TextSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
</pre>
</blockquote>
<br>
</body>
</html>