AnsweredAssumed Answered

How to set width and height of an image

Question asked by pavelvpv on Jun 27, 2016
Latest reply on Jun 28, 2016 by ppapadopoulosmarathondata-gr-esridist



I'm trying to add an image to the map using Javascript API 3.16. But I can't apply width and height to the image.

When I'm adding the image, style attribute of the image is set to width, height of map style. So the image is stretched.


Here is the piece of code I'm using:



            function(MapImageLayer, MapImage) {

                var newImage = MapImage({


                            'href': url



                newImage.width = width;

                newImage.height = height;


                var imageLayer = new MapImageLayer({

                                id: layer_id