[mapguide-users] blink a layer or a feature
Liglio
liglio at pobox.com
Mon Nov 23 13:48:01 PST 2015
My code does not have throw exceptions, but does not show the added layer. I
am using AIMS 2014, Fusion viewer and google base map. The layer "LTR-off"
is already created in my library, but is not added to my map in the library.
So I am adding the layer in the code bellow. The addLayer function is called
at the onload of my HomeTaskPanel page. The map variable is sucessfully
pointed, also the oMapOL.
var url =
"http://localhost/mapserver2014/mapagent/mapagent.fcgi?USERNAME=Anonymous";
var metersPerUnit = 1;
var mapWindow = window.top.FrameMapa;
var Fusion = mapWindow.Fusion;
var OpenLayers = mapWindow.OpenLayers;
var inPerUnit = OpenLayers.INCHES_PER_UNIT.m * metersPerUnit;
OpenLayers.INCHES_PER_UNIT["dd"] = inPerUnit;
OpenLayers.INCHES_PER_UNIT["degrees"] = inPerUnit;
OpenLayers.DOTS_PER_INCH = 96;
function AddLayer() {
var map = Fusion.getWidgetById("Map");
var options = { isBaseLayer: true, transitionEffect: "resize",
buffer: 1, useOverlay: false, useAsyncOverlay: false, singleTile: true };
var params = {};
params.mapName = '<%=sessionId%>';
params.session = '<%=mapName%>';
var layer = new OpenLayers.Layer.MapGuide("LTR-off", url,
params, options);
map.oMapOL.addLayer(layer);
}
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/blink-a-layer-or-a-feature-tp5236968p5238161.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list