[OpenLayers-Users] Loading multiple images onto OpenLayers

Albert Ang bluesky003 at gmail.com
Thu Dec 15 00:30:05 EST 2011


Dear Bart,

thank you very much. It works!

Best regards.

Albert

On Wed, Dec 14, 2011 at 6:42 PM, Bart van den Eijnden <bartvde at osgis.nl>wrote:

> Add isBaseLayer: false to your options1 and options2.
>
> Bart
>
> --
> Bart van den Eijnden
> OSGIS - http://osgis.nl
>
> On Dec 14, 2011, at 11:40 AM, Albert Ang wrote:
>
> 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]);
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111215/3a7a53dd/attachment.html


More information about the Users mailing list