Hi guys,
My LedgendLayer is moving as i scroll, It pops up when the map is in view and disapears when it is not in view. It also scrolls on the page. I need it to be static on the top right of the map.
See video:screencast.com/t/FRg6mMsGFt
Hi guys,
My LedgendLayer is moving as i scroll, It pops up when the map is in view and disapears when it is not in view. It also scrolls on the page. I need it to be static on the top right of the map.
See video:screencast.com/t/FRg6mMsGFt
Hi Gregory,
Thanks for your video, I copy the code from wiki sample and did test but haven’t succeed reproduce that. (wiki.thinkgeo.com/wiki/Map_Suite_Desktop_Edition_All_Samples#Show_A_Legend)
I saw your map looks repeat vetical from the vedio, could you provide a simple sample with your scenario so that we can reproduce that?
Regards,
Don
unfoturtunately the sample is not available.
I have 3 maps on one page. thats why it looks like a reapeat, i have Map1 Map2 and Map3.
Map3 needs the legend, and yet it is floating.
Gregory,
Thanks for your description, I think that’s sure a bug. I will build a sample and wait our developer fix that.
They are focus on the new release these days, I will update status if I get any response about this.
Regards,
Don
Gregory,
Sorry we haven't fixed that today, we have a workaround now.
Put this javascript in the head tag.
<script type="text/javascript">
var OnMapCreating = function(map) {
OpenLayers.Layer.AdornmentLayer = OpenLayers.Class(OpenLayers.Layer.WMS, {
moveTo: function (bounds, zoomChanged, dragging) {
OpenLayers.Layer.WMS.prototype.moveTo.apply(this, arguments);
if (!this.grid.length) {
OpenLayers.Util.modifyDOMElement(this.grid[0][0].frame,null, newOpenLayers.Pixel(0, 0), null, "relative", null,null, null);
}
else {
var tile = this.grid[0][0];
var src = this.getURL(bounds);
tile.imgDiv.src = src + "&extra=" + Math.random();
}
}
});
};
</script>
Regards,
Don
Thank you !!! that worked !!!
Hi Gregory,
I think we have fixed that in the latest package, if you want you can get that tomorrow and try it.
Regards,
Don