Hi Andreas and other Mapbuilder developers, After long time I developed my application for moving objects in a MVC way. At the moment I only have some problems on paint the markers as layer on the map of mapbuilder.
I first start to use this example in a normal html page including the
libs of openlayers, and I was able to see the markers. But when I start
to use mapbuilder, I was not able to see the markers anymore (but no
error message)
I am sure that long lat vaues are correct.
Any idea what that could be?
P.S. I used the content from class GMLRendererOL, and made some
modifications. I am using Mapbuilders main trunk.
thanks for anyhelp
***** code ****
/**
*
* @param {Object} objRef
*/
this.paint = function(objRef) {
if (objRef.olLayer) {
objRef.model.setParam('gmlRendererLayer', null);
if (objRef.targetModel.map == objRef.map) {
objRef.olLayer.destroy();
objRef.olLayer = null;
}
}
objRef.olLayer = new OpenLayers.Layer.Markers( "Markers" );
objRef.targetModel.map.addLayer(objRef.olLayer);
var size = new OpenLayers.Size(25,25);
var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
var icon = new
OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,offset);
var marker1 = new OpenLayers.Marker(new
OpenLayers.LonLat(11.33,46.51),icon);
marker1.setOpacity(0.9);
objRef.olLayer.addMarker(marker1);
objRef.model.setParam('gmlRendererLayer', objRef.olLayer);
}
this.model.addListener("refresh",this.paint, this);
--
Markus Innerebner
DIS Research Group - Faculty of Computer Science
Free University Bozen-Bolzano
Dominikanerplatz 3 - Room 213
I - 39100 Bozen
Phone: +39-0471-016223
Mobile: +39-333-9392929
gpg --fingerprint
-------------------------------------
pub 1024D/588F6308 2007-01-09
Key fingerprint = 6948 947E CBD2 89FD E773 E863 914F EB1B 588F
6308
sub 2048g/BF4877D0 2007-01-09
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________ mapbuilder-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-devel
