[OpenLayers-Users] Loading multiple images onto OpenLayers

Albert Ang bluesky003 at gmail.com
Wed Dec 14 05:40:06 EST 2011


Dear users,

I wish to load multiple images onto OpenLayers at the same time but it
seems it can only shows one image and by default they become base layer.
Kindly advise.

Thank you adn best regards.

Albert Ang

Here are my code sniplets :

(only the first image is shown when I tested out my code)

var options1 = {'numZoomLevels': 5};

var options2 = {'numZoomLevels': 5};

var map1 = new OpenLayers.Layer.Image('Archive Image',

 'ovr/WV200326510001A_000007993_Browse_0.jpg',
                                 new OpenLayers.Bounds(103.321116,
1.583172, 103.477428, 1.814436),
                                 new OpenLayers.Size(1089, 1659),
                               options1);

var map2 = new OpenLayers.Layer.Image(
                                 'Archive Image 2',

 'ovr/WV200326510001A_000007995_Browse_0.jpg',
                                 new OpenLayers.Bounds(103.463892, 1.43946,
103.614444, 1.81746),
                                 new OpenLayers.Size(1050, 2669),
                                 options2);

map.addLayers([map1, map2]);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111214/37c9d9b4/attachment.html


More information about the Users mailing list