[mapguide-users] R: Mapguide vs OpenLayers: troubles with tiles on EPSG 21781

Francesco Sozzi fsozzi at intercad.ch
Sun Feb 2 03:43:59 PST 2014


The error has been the wrong base layer name
Regards

Franz

-----Messaggio originale-----
Da: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] Per conto di Franz1965
Inviato: domenica, 2. febbraio 2014 01:44
A: mapguide-users at lists.osgeo.org
Oggetto: [mapguide-users] Mapguide vs OpenLayers: troubles with tiles on
EPSG 21781

Hi everybody,

I have no problem with OpenLayers sample on Mapguide if I execute on
Sheboygan, bot tiled and not tiled.
I have no problems if I convert this sample on my project on EPSG:21781 on
not-tiled version.
But tiled map does not display. I can display tiled map on AjaxViewer or
Maestro, but not on OpenLayers.

Any idea?...

Best regards

//tiled version
function initTiled(){

	var extent = new
OpenLayers.Bounds(562985.576,158127.222,568066.399,165643.041);
	var tempScales = [35000,15000,5000,1500,500,200,100];
	var mapOptions = {
		maxExtent: extent, 
		scales: tempScales
	};
	map = new OpenLayers.Map( 'map', mapOptions );
	
	var params = {
	  mapdefinition:
'Library://INFOGEO/MyProject/Default.MapDefinition',
	  basemaplayergroupname: "Base Layer Group"
	};
	var options = {
	  singleTile: false 
	};
	var layer = new OpenLayers.Layer.MapGuide( "MapGuide OS tiled
layer", url, params, options );
	map.addLayer(layer);

	map.zoomToMaxExtent();
}


//un-tiled version
function initUntiled() {

  var extent = new
OpenLayers.Bounds(562985.576,158127.222,568066.399,165643.041);		  
  var mapOptions = {
		units: 'm',
		projection: 'EPSG:21781',
		maxExtent: extent, 
		maxResolution: 'auto',
		controls: []
  };
  map = new OpenLayers.Map( 'map2', mapOptions );
  
				
	map.addControl(new OpenLayers.Control.NavToolbar());
	map.addControl(new OpenLayers.Control.PanZoom());
	map.addControl(new OpenLayers.Control.NavigationHistory());
	
  var options = {
	  isBaseLayer: true,
	  transitionEffect: "resize",
	  buffer: 1,
	  useOverlay: false,
	  useAsyncOverlay: false,
	  singleTile: true
  };

  var params = {
	  mapdefinition: 'Library://INFOGEO/MyProject/Default.MapDefinition'
  };
  
  var layer = new OpenLayers.Layer.MapGuide( "MapGuide OS untiled
baselayer", url, params, options );
  map.addLayer(layer);
  
	map.addControl(new OpenLayers.Control.LayerSwitcher());
	map.zoomToMaxExtent();
}



--
View this message in context:
http://osgeo-org.1560.x6.nabble.com/Mapguide-vs-OpenLayers-troubles-with-til
es-on-EPSG-21781-tp5101387.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users



More information about the mapguide-users mailing list