Hello Herry,

Perhaps there is no 'test' layer in you Map, only in your overviewMap? In the 
example i gave you the layernames needs to be te same.

Roy
  _____  

From: herry13 [mailto:[email protected]]
To: [email protected]
Sent: Mon, 10 Jan 2011 23:28:40 +0100
Subject: [OpenLayers-Users] Re: Changing Map of Overview Map Control


  Hi Roy,
  
  Thanks for the codes. I've run it, and there's bugs:
  1) method 'getLayerByName' should be 'getLayersByName'
  2) I've fixed #1 bug, but following exception was caught by Chrome:
  ===================
  Uncaught TypeError: Cannot read property 'test' of undefined
  OpenLayers.Map.OpenLayers.Class.getByMap.js:733
  OpenLayers.Map.OpenLayers.Class.getLayersByMap.js:758
  OpenLayers.Map.OpenLayers.Class.getLayersByNameMap.js:778
  snap.OpenLayers.Control.Snapping.layerdmp.php:331
  OpenLayers.Events.OpenLayers.Class.triggerEventEvents.js:765
  OpenLayers.Layer.OpenLayers.Class.setVisibilityLayer.js:696
  OpenLayers.Layer.Google.OpenLayers.Class.setVisibilityGoogle.js:171
  OpenLayers.Map.OpenLayers.Class.setBaseLayerMap.js:1122
  
OpenLayers.Control.LayerSwitcher.OpenLayers.Class.onInputClickLayerSwitcher.js:377
  (anonymous function)
  ===================
  I've tried to trace into OpenLayers code but haven't been found the
  solution.
  
  cheers,
  Herry
  -- 
  View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Changing-Map-of-Overview-Map-Control-tp5904022p5908865.html
  Sent from the OpenLayers Users mailing list archive at Nabble.com.
  _______________________________________________
  Users mailing list
  [email protected]
  http://lists.osgeo.org/mailman/listinfo/openlayers-users
    
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to