[OpenLayers-Users] Error: "template.replace is not a function"

daniel.smith1 daniel.smith1 at maine.edu
Mon Jun 28 19:23:55 EDT 2010



daniel.smith1 wrote:
> 
>  map = new OpenLayers.Map( 'map', options );
>  
>  OSMBaseLayer = new OpenLayers.Layer.OSM(
>    "OSM",
>    {numZoomLevels: 20, 'sphericalMercator': true, 'isBaseLayer': true,
>    'maxExtent': new OpenLayers.Bounds(-20037508.34, -20037508.34,
>     20037508.34, 20037508.34)}
>  );
> 

Well I've changed the above to:

 map = new OpenLayers.Map( 'mapViewer', options );
 OSMBaseLayer = new OpenLayers.Layer.OSM();

This has fixed my immediate problems but I'm still not sure what was wrong
with the parameters I had before.  Also, using 'map' as my map name was bad
practice so I changed that.  I'm still curious if anyone could shed some
light on this.
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Error-template-replace-is-not-a-function-tp5231723p5233062.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list