You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.
I am using annotorious plugin in my project. I am using it with openLayer and in that ImageLayer. The issue which I am facing is when I initialize plugin, image get stretched. Check my code below.
init_annotorious = function()
{
var img_src = $('#map').attr('attr-img-src');
$('#map').removeClass('annotorious_map');
if(typeof img_src != "undefined" && img_src != "")
{
$('#map').addClass('annotorious_map');
$('.annotate-action-btn').show();
anno.destroy();
$('#map').html("");
map = new OpenLayers.Map('map', { numZoomLevels: 4 });
var proof = new OpenLayers.Layer.Image('proofimg', img_src, new OpenLayers.Bounds(-600, -500, 250, 600), new OpenLayers.Size(375, 750));
proof.setIsBaseLayer(true);
proof.display(true);
map.addLayer(proof);
map.setCenter(new OpenLayers.LonLat(0,0),0,false,true)
anno.makeAnnotatable(map);
add_floor_coordinates();
}
}
Note : I am not allowed to change image dimensions at any cost. Image can be of any height width.
I need a way where this height, width could be set automatically.
Below is the line where I think something could be done.
var proof = new OpenLayers.Layer.Image('proofimg', img_src, new OpenLayers.Bounds(-600, -500, 250, 600), new OpenLayers.Size(375, 750));
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I am using annotorious plugin in my project. I am using it with openLayer and in that ImageLayer. The issue which I am facing is when I initialize plugin, image get stretched. Check my code below.
init_annotorious = function()
{
var img_src = $('#map').attr('attr-img-src');
Note : I am not allowed to change image dimensions at any cost. Image can be of any height width.
I need a way where this height, width could be set automatically.
Below is the line where I think something could be done.
var proof = new OpenLayers.Layer.Image('proofimg', img_src, new OpenLayers.Bounds(-600, -500, 250, 600), new OpenLayers.Size(375, 750));
The text was updated successfully, but these errors were encountered: