[OpenLayers-Users] Re: WMS in Geoserver not working

sacprasanna sacprasanna at gmail.com
Mon Apr 23 00:07:51 EDT 2012


Sorry this is my first post,I add int function to it but it not
showing in e-mail.I don't know what is the reason.But finally i figure
out the answer.I did not add projection and so on.Thanks for your
interest and i need your valuable help in future as well.This is int
function.
var map;
 function init() {
map = new OpenLayers.Map('map_element', {});
var wms = new OpenLayers.Layer.WMS( 'OpenLayers WMS',
'http://localhost:8080/geoserver/sac/wms',
{layers: 'sac:Luse'}, {} ); m
ap.addLayer(wms);
if(!map.getCenter())
{ map.zoomToMaxExtent(); } }

On Mon, Apr 23, 2012 at 3:24 AM, Phil Scadden [via OSGeo.org]
<ml-node+s1560n4908405h83 at n6.nabble.com> wrote:
>
> Without seeing the init function its hard to comment. However, I would
> go to geoserver, preview layers, look at it in openlayer format, then
> right click and do show page source. This will show you a skeleton html
> plus openlayer coding for viewing that layer. You can use that plus the
> OL examples page to get an understanding of the code and build from there.
>
> Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://osgeo-org.1560.n6.nabble.com/WMS-in-Geoserver-not-working-tp4904542p4908405.html
> To unsubscribe from WMS in Geoserver not working, click here.
> NAML


--
View this message in context: http://osgeo-org.1560.n6.nabble.com/WMS-in-Geoserver-not-working-tp4904542p4909102.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120422/753982b6/attachment-0001.html


More information about the Users mailing list