[Aust-NZ] VicMap API JavaScript - who's the developer?

Justin Madex justin.83 at gmail.com
Tue Sep 27 17:48:56 PDT 2011


Hi Noli,

Sorry for the delay, been flat out at work.

Vicmap API's was planned to be only used as a base layer on a map due to a few restrictions.
- that's the intention of DSE
- the tiles are not transparent
- Vicmap API only supports the predefined 14 zoom levels/scale

That said, you can still use it as a wms layer but you will need to use the projection EPSG:3111
See the following sample code:

		<script type="text/javascript">
		
		var map;
		var layer;
		var lon = 2439245.01855;
       var lat = 2526943.49665;

		function init()
		{
			var options = {
				projection : new OpenLayers.Projection("EPSG:3111"),
			};
			
           map = new OpenLayers.Map( 'map', options );

           var basemap = new OpenLayers.Layer.WMS( "vicmapapi", "http://lctest.land.vic.gov.au/vicmapapi/map/wms",
           	{
           		layers: 'CARTOGRAPHICAL', 
					format: 'image/png', 
					transparent: 'off'
				},
               {
               	maxExtent: new OpenLayers.Bounds(1749210.30515, 2010475.79705, 3336713.48015, 3066694.57615), 
               	maxResolution: 'auto'
               } );

           map.addLayer(basemap);

           map.setCenter(new OpenLayers.LonLat(lon, lat));
           map.addControl( new OpenLayers.Control.LayerSwitcher() );
		}
		
		</script>

I hope this helps. Give me a shout if you have any questions

- Justin




On 28/09/2011, at 9:11 AM, Noli Sicad wrote:

> Hi Justin,
> 
> I have not heard from you.
> 
> Here's (code below) again, VicMap WMS code that is not working.
> 
> #########################
> <script src="OpenLayers.js"></script>
>   <script type="text/javascript">
>       var map, layer, a, b;
>       a=new
> OpenLayers.Bounds(1786000.0,1997264.499195665,3953471.00160867,3081000.0);
>       b="Vicmap API © 2011 State Government of Victoria";
> 
>       function init(){
>           map = new OpenLayers.Map( 'map' );
> 
>           layer = new
> OpenLayers.Layer.WMS("VicMap","http://116.240.195.134/vicmapapi/map/wms",
>           {layers:'VicMap',format:"image/png",firstTile:true},
>           {tileSize:new OpenLayers.Size(512,512),tileOrigin:new
> OpenLayers.LonLat(-34932800,57119200),isBaseLayer:true,
>           buffer:0,maxExtent:a,attribution:b});
> 
>           map.addLayer(layer);
>           map.zoomToMaxExtent();
>       }
>   </script>
> 
> Anybody in the list knowledgeable how to fix this code to make it working?
> 
> Thanks.
> 
> Noli
> 
> 
> On 9/27/11, Noli Sicad <nsicad at gmail.com> wrote:
>> Hi Justin,
>> 
>> Thanks for replying.
>> 
>> I sent you an email on the details of my problem using VicMap WMS
>> (offline the Aust-NZ list).
>> 
>> Thanks.
>> 
>> Noli
>> 
>> 
>> 
>> On 9/27/11, Justin Madex
>>> Hi Noli,
>>> 
>>> I work for Dialog IT and we developed VicMap API
>>> Was there an issue you were experiencing?
>>> 
>>> - Justin
> _______________________________________________
> Aust-NZ mailing list
> Aust-NZ at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/aust-nz

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/oceania/attachments/20110928/c6464351/attachment.html>


More information about the Oceania mailing list