<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Noli,<br><br>Sorry for the delay, been flat out at work.<br><br>Vicmap API's was planned to be only used as a base layer on a map due to a few restrictions.<br>- that's the intention of DSE<br>- the tiles are not transparent<br>- Vicmap API only supports the predefined 14 zoom levels/scale<br><br>That said, you can still use it as a wms layer but you will need to use the projection EPSG:3111<br>See the following sample code:<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><script type="text/javascript"><br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>var map;<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>var layer;<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>var lon = 2439245.01855;<br> var lat = 2526943.49665;<br><br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>function init()<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>{<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>var options = {<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>projection : new OpenLayers.Projection("EPSG:3111"),<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>};<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><br> map = new OpenLayers.Map( 'map', options );<br><br> var basemap = new OpenLayers.Layer.WMS( "vicmapapi", "<a href="http://lctest.land.vic.gov.au/vicmapapi/map/wms">http://lctest.land.vic.gov.au/vicmapapi/map/wms</a>",<br> <span class="Apple-tab-span" style="white-space: pre; "> </span>{<br> <span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>layers: 'CARTOGRAPHICAL', <br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>format: 'image/png', <br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>transparent: 'off'<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>},<br> {<br> <span class="Apple-tab-span" style="white-space: pre; "> </span>maxExtent: new OpenLayers.Bounds(1749210.30515, 2010475.79705, 3336713.48015, 3066694.57615), <br> <span class="Apple-tab-span" style="white-space: pre; "> </span>maxResolution: 'auto'<br> } );<br><br> map.addLayer(basemap);<br><br> map.setCenter(new OpenLayers.LonLat(lon, lat));<br> map.addControl( new OpenLayers.Control.LayerSwitcher() );<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span>}<br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span><br><span class="Apple-tab-span" style="white-space: pre; "> </span><span class="Apple-tab-span" style="white-space: pre; "> </span></script><br><br>I hope this helps. Give me a shout if you have any questions<br><br>- Justin<div><br></div><div><br></div><div><br></div><div><br><div><div>On 28/09/2011, at 9:11 AM, Noli Sicad wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Hi Justin,<br><br>I have not heard from you.<br><br>Here's (code below) again, VicMap WMS code that is not working.<br><br>#########################<br><script src="OpenLayers.js"></script><br> <script type="text/javascript"><br> var map, layer, a, b;<br> a=new<br>OpenLayers.Bounds(1786000.0,1997264.499195665,3953471.00160867,3081000.0);<br> b="Vicmap API © 2011 State Government of Victoria";<br><br> function init(){<br> map = new OpenLayers.Map( 'map' );<br><br> layer = new<br>OpenLayers.Layer.WMS("VicMap","<a href="http://116.240.195.134/vicmapapi/map/wms">http://116.240.195.134/vicmapapi/map/wms</a>",<br> {layers:'VicMap',format:"image/png",firstTile:true},<br> {tileSize:new OpenLayers.Size(512,512),tileOrigin:new<br>OpenLayers.LonLat(-34932800,57119200),isBaseLayer:true,<br> buffer:0,maxExtent:a,attribution:b});<br><br> map.addLayer(layer);<br> map.zoomToMaxExtent();<br> }<br> </script><br><br>Anybody in the list knowledgeable how to fix this code to make it working?<br><br>Thanks.<br><br>Noli<br><br><br>On 9/27/11, Noli Sicad <<a href="mailto:nsicad@gmail.com">nsicad@gmail.com</a>> wrote:<br><blockquote type="cite">Hi Justin,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks for replying.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I sent you an email on the details of my problem using VicMap WMS<br></blockquote><blockquote type="cite">(offline the Aust-NZ list).<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Noli<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 9/27/11, Justin Madex<br></blockquote><blockquote type="cite"><blockquote type="cite">Hi Noli,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I work for Dialog IT and we developed VicMap API<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Was there an issue you were experiencing?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">- Justin<br></blockquote></blockquote>_______________________________________________<br>Aust-NZ mailing list<br><a href="mailto:Aust-NZ@lists.osgeo.org">Aust-NZ@lists.osgeo.org</a><br>http://lists.osgeo.org/mailman/listinfo/aust-nz<br></div></blockquote></div><br></div></body></html>