Hi, I just written a new layer class just like WMS in a separate JS file and added the file path to jsfiles variable ( array of jsfiles) and then tried to create a new instance of my layer. I got the following error
*"Object expected "*
My script section goes like this
<script type="text/javascript">
//var map = new OpenLayers.Map('map',{maxResolution: 1000} );
var map = new OpenLayers.Map('map', {
maxExtent: new OpenLayers.Bounds(
-638480920.244,-188017611.367,665489491.580,1019789790.73),maxResolution:
1000000 } );
var nativeURL = "
http://siasporapv01:8080/gss/native?crs=sw:nsw_trans_mercator_mm";
var cadLayer = new OpenLayers.Layer.SW( 'Cadastre' , nativeURL , {
layers: 'cadastre' , overlays: '' , ace_name: 'street_light' } , { buffer: 1
, isBaseLayer: true } );
map.addLayers( [ cadLayer ] );
map.zoomToMaxExtent();
</script>
and that problem is at the line
*var cadLayer = new OpenLayers.Layer.SW( 'Cadastre' , nativeURL , { layers:
'cadastre' , overlays: '' , ace_name: 'street_light' } , { buffer: 1 ,
isBaseLayer: true } );*
I think the constructor is not returning a object and it's complaining that.
I don't know why is not returning any object. I attached SW.js to this
email.
Any help is very much appreciated.
Thanks,
SW.js
Description: JavaScript source
_______________________________________________ Users mailing list [email protected] http://openlayers.org/mailman/listinfo/users
