Hi Jair,
can you confirm you can see a map with your layer in the layer preview
page?
http://localhost:8081/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=Img_Sample&styles=&bbox=-130.85168,20.7052,-62.0054,54.1141&width=768&height=372&srs=EPSG:4326&format=application/openlayers

If that is the case, it means GeoServer is working correctly and so your
question should rather be addressed to the OpenLayers' mailing list.

Hope this helps,
Stefano


Il giorno dom, 26/07/2015 alle 12.35 -0700, Jair Santos ha scritto:
> Hi all,
> 
> I am trying to create my first WMS application using the snippet of code
> below.
> 
> Geoserver is running on port 8081 and I have a web site on port 8080, both
> in the same server. When I try  http://192.168.1.113:8080/  I get only the
> div and a place holder for the image.
> 
> Any help will be very much appreciated.
> 
> TIA.
> 
> JJ.
> 
> <html>
> <head>
>   <title>OpenLayers Example</title>
>     <script src="http://openlayers.org/api/OpenLayers.js";></script>
>     </head>
>     <body>
>       <div style="width:100%; height:100%" id="map"></div>
>       <script defer="defer" type="text/javascript">
>         var map = new OpenLayers.Map('map');
>         var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
>             "localhost:8081/geoserver/wms", {layers: 'Img_Sample'} );
>         map.addLayer(wms);
>         map.zoomToMaxExtent();
>       </script>
> 
> </body>
> </html>
> 
> 
> 
> -----Original Message-----
> From: Ben Caradoc-Davies [mailto:[email protected]] 
> Sent: 22-Jul-15 8:00 PM
> To: Jair Santos <[email protected]>
> Cc: [email protected]
> Subject: Re: [Geoserver-users] Broken links in thread
> 
> [Please keep discussions on-list]
> 
> Jair,
> 
> delivery of the web content is not configured in GeoServer; it is configured
> on your web site. GeoServer will respond to requests from the client browser
> generated using, for example, OpenLayers JavaScript. 
> GeoServer is the server, and OpenLayers JavaScript is the client.
> 
> On the server that hosts www.example.com, there should be a directory that
> stores your web content. For example, it might be /var/www or
> /home/username/public_html. It likely has  an index.html in it. If you add
> an HTML file demo.html in this directory you should be able to access it as
> http://www.example.com/demo.html .
> 
> Place the content of this example in your demo.html and change the ImageWMS
> url and params to reference your WMS:
> http://openlayers.org/en/v3.7.0/examples/wms-image.html
> 
> Here is the catch: GeoServer must be somewhere external users can access it.
> For example: http://services.example.com/geoserver and perhaps your WMS
> service endpoint is http://services.example.com/geoserver/wms , but it is
> also fine for them to be on the same server. You might have something like
> this in OpenLayers:
> 
> url: 'http://services.example.com/geoserver/wms',
> params: {'LAYERS': 'ns:layername'},
> 
> where ns:layername is your layer name.
> 
> When a web user loads http://www.example.com/demo.html their browser loads
> the JavaScript which then makes requests to
> http://services.example.com/geoserver/wms to get the rendered images on
> demand, with new requests as they pan and zoom.
> 
> There are many excellent examples for OpenLayers: 
> http://openlayers.org/en/v3.7.0/examples/
> 
> Kind regards,
> Ben.
> 
> On 23/07/15 14:37, Jair Santos wrote:
> > Yes, I realized that Ben. I created the data store, opened the layer 
> > and saw the data.
> >
> > I don't know how to setup in the Geoserver the web site that will 
> > display the data.
> >
> > Let's say that I have the site www.example.com, where do I enter this 
> > information in Geoserver and how to set it up?
> >
> > Thank you.
> >
> > JJ.
> >
> > -----Original Message-----
> > From: Ben Caradoc-Davies [mailto:[email protected]]
> > Sent: 22-Jul-15 7:19 PM
> > To: Jair Santos; GeoServer Mailing List List
> > Subject: Re: [Geoserver-users] Broken links in thread
> >
> > Jair,
> >
> > you already have PostGIS installed so all you need to do is connect 
> > GeoServer. See this quick-start guide:
> > http://docs.geoserver.org/latest/en/user/gettingstarted/postgis-quicks
> > tart/i
> > ndex.html#create-a-data-store
> >
> > Each table or view in PostGIS can be published as a layer. You can 
> > then render these using WMS (see the OpenLayers preview). Now create a 
> > web page that uses OpenLayers configured to display your new WMS service:
> > http://openlayers.org/
> > http://openlayers.org/en/v3.7.0/examples/wms-image.html
> > (although it looks like the demo WMS is down; try using your new WMS!)
> >
> > More PostGIS detail:
> > http://docs.geoserver.org/latest/en/user/data/database/postgis.html
> >
> > Kind regards,
> > Ben.
> >
> > On 23/07/15 12:42, Jair Santos wrote:
> >> Thank you Ben.
> >>
> >> Actually I've just installed Geoserver and I have some PostGis data 
> >> that I want to make available in the web. Reading the manuals I found 
> >> out that I need to use WMS, and I am trying to understand how it 
> >> works. I saw the description of several commands or functions such as 
> >> GetCapabilities , GetFeatureInfo, etc..
> >>
> >> I thought that to make the map available in the web I needed only to 
> >> adjust settings in Geoserver pretty much like a normal web server. Am 
> >> I
> > wrong?
> >>
> >> If you can point me to information about how to do that I will 
> >> appreciate very much.
> >>
> >> Best regards.
> >>
> >> JJ
> >>
> >> -----Original Message-----
> >> From: Ben Caradoc-Davies [mailto:[email protected]]
> >> Sent: 22-Jul-15 5:31 PM
> >> To: Jair Santos; GeoServer Mailing List List
> >> Subject: Re: [Geoserver-users] Broken links in thread
> >>
> >> Jair,
> >>
> >> those links are from 2006! The nearest I can think of is the Styling 
> >> section in the User Manual:
> >> http://docs.geoserver.org/latest/en/user/styling/index.html
> >>
> >> The User Manual also has a Tutorials section, but you might start at 
> >> the top level as a quick way of finding all the getting started, 
> >> reference, and tutorial documentation:
> >> http://docs.geoserver.org/latest/en/user/
> >>
> >> Are you looking for something in particular?
> >>
> >> Kind regards,
> >> Ben.
> >>
> >> On 23/07/15 11:32, Jair Santos wrote:
> >>> Hello Everyone
> >>>
> >>>
> >>>
> >>> In this thread there are two links that I am interested in:
> >>>
> >>>
> >>>
> >>> http://sourceforge.net/p/geoserver/mailman/message/11250960/
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> Both links were served by CODEHAUS which services are terminated.
> >>>
> >>>
> >>>
> >>> Does anybody know where the documents can pointed out by these links
> are?
> >>>
> >>>
> >>>
> >>> Thanks
> >>>
> >>>
> >>>
> >>> JJ
> >>>
> >>>
> >>>
> >>>
> >>> --------------------------------------------------------------------
> >>> -
> >>> -
> >>> --------
> >>>
> >>>
> >>>
> >>> _______________________________________________
> >>> Geoserver-users mailing list
> >>> [email protected]
> >>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> >>>
> >>
> >> --
> >> Ben Caradoc-Davies <[email protected]> Director Transient Software 
> >> Limited <http://transient.nz/> New Zealand
> >>
> >> ---------------------------------------------------------------------
> >> -
> >> ------
> >> --
> >> _______________________________________________
> >> Geoserver-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> >>
> >>
> >> ---------------------------------------------------------------------
> >> -
> >> -------- _______________________________________________
> >> Geoserver-users mailing list
> >> [email protected]
> >> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> >>
> >
> > --
> > Ben Caradoc-Davies <[email protected]>
> > Director
> > Transient Software Limited <http://transient.nz/> New Zealand
> >
> > ----------------------------------------------------------------------
> > ------
> > --
> > _______________________________________________
> > Geoserver-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/geoserver-users
> >
> >
> >
> 
> --
> Ben Caradoc-Davies <[email protected]>
> Director
> Transient Software Limited <http://transient.nz/> New Zealand
> 
> ----------------------------------------------------------------------------
> --
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

-- 

Best regards,
Stefano Costa

==
GeoServer Professional Services from the experts! Visit
http://goo.gl/it488V for more information.
==
Dott. Stefano Costa
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:     +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o
nel/i file/s allegato/i sono da considerarsi strettamente riservate.
Il loro utilizzo è consentito esclusivamente al destinatario del
messaggio, per le finalità indicate nel messaggio stesso. Qualora
riceviate questo messaggio senza esserne il destinatario, Vi preghiamo
cortesemente di darcene notizia via e-mail e di procedere alla
distruzione del messaggio stesso, cancellandolo dal Vostro sistema.
Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità
diverse, costituisce comportamento contrario ai principi dettati dal
D.Lgs. 196/2003.

The information in this message and/or attachments, is intended solely
for the attention and use of the named addressee(s) and may be
confidential or proprietary in nature or covered by the provisions of
privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New
Data Protection Code).Any use not in accord with its purpose, any
disclosure, reproduction, copying, distribution, or either
dissemination, either whole or partial, is strictly forbidden except
previous formal approval of the named addressee(s). If you are not the
intended recipient, please contact immediately the sender by
telephone, fax or e-mail and delete the information in this message
that has been received in error. The sender does not give any warranty
or accept liability as the content, accuracy or completeness of sent
messages and accepts no responsibility  for changes made after they
were sent or for other risks which arise as a result of e-mail
transmission, viruses, etc.




------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to