[OpenLayers-Users] How to print map area with openlayers

Carlos Henriquez carloshhp at gmail.com
Sun Mar 27 01:05:19 EDT 2011


Hi, i'm also new to openlayers but i found out how to print maps by looking
at the examples in the openlayers examples, check the BASIC SINGLE
WMS EXAMPLE code, for what i understand there are a few steps u must follow:

1) include in ur site the OpenLayers,js file
<script src="../lib/OpenLayers.js"></script>
2)in javascript define map and layer variables
var map, layer;
3)define init function which can change depending on what u want to do
 function init(){
   ..........
  }
 4)make the body event "onload" calls init function
<body onload="init()">
5)create a div with "map" id
<div id="map" class="smallmap"></div>


2011/3/25 Gagan Suri <gagan.suri at gmail.com>

> S Shadab <shadab2k8 at ...> writes:
>
> hi shadab,
> did u get the solution to this problem. I am also having the same task at
> hand.
> And I am new to openlayers and javascript.
> Also the backend code that we are using in java and not php as mentioned in
> the
> post.Any help would be highly appreciated.
> Thanks,
> Gagan
>
> _______________________________________________
> 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/20110326/c872efd5/attachment.html


More information about the Users mailing list