[Geoserver-users] WMS application

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&quot;&gt;&lt;/script&gt;
    </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:ben@anonymised.com]
Sent: 22-Jul-15 8:00 PM
To: Jair Santos <jsantos5954@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
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:ben@anonymised.com]
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:ben@anonymised.com]
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
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <ben@anonymised.com> Director Transient Software
Limited <http://transient.nz/&gt; New Zealand

---------------------------------------------------------------------
-
------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

---------------------------------------------------------------------
-
-------- _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt; New Zealand

----------------------------------------------------------------------
------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt; New Zealand

----------------------------------------------------------------------------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

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&quot;&gt;&lt;/script&gt;
    </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:ben@anonymised.com]
Sent: 22-Jul-15 8:00 PM
To: Jair Santos <jsantos5954@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
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:ben@anonymised.com]
> 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:ben@anonymised.com]
>> 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
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>
>> --
>> Ben Caradoc-Davies <ben@anonymised.com> Director Transient Software
>> Limited <http://transient.nz/&gt; New Zealand
>>
>> ---------------------------------------------------------------------
>> -
>> ------
>> --
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>> ---------------------------------------------------------------------
>> -
>> -------- _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
> --
> Ben Caradoc-Davies <ben@anonymised.com>
> Director
> Transient Software Limited <http://transient.nz/&gt; New Zealand
>
> ----------------------------------------------------------------------
> ------
> --
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt; New Zealand

----------------------------------------------------------------------------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
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.

Thank you Stefano. That helps.

The answer is yes, I can see the map from this link.

I just can't see anything wrong with code. I pretty much copied and changed the line to

var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
     "localhost:8081/geoserver/wms", {layers: 'Img_Sample'} );

If anybody has any thoughts please share it. I'll try the open layers list though.

JJ.

-----Original Message-----
From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: 27-Jul-15 1:56 AM
To: Jair Santos <jsantos5954@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] WMS application

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&quot;&gt;&lt;/script&gt;
    </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:ben@anonymised.com]
Sent: 22-Jul-15 8:00 PM
To: Jair Santos <jsantos5954@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
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:ben@anonymised.com]
> 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-quic
> ks
> 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:ben@anonymised.com]
>> 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
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>
>> --
>> Ben Caradoc-Davies <ben@anonymised.com> Director Transient Software
>> Limited <http://transient.nz/&gt; New Zealand
>>
>> -------------------------------------------------------------------
>> --
>> -
>> ------
>> --
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>> -------------------------------------------------------------------
>> --
>> -
>> -------- _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
> --
> Ben Caradoc-Davies <ben@anonymised.com> Director Transient Software
> Limited <http://transient.nz/&gt; New Zealand
>
> --------------------------------------------------------------------
> --
> ------
> --
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt; New Zealand

----------------------------------------------------------------------
------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------
-------- _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
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
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Hi James and thank you for your response. AFAIK the web site and geoserver
can be in different servers. Or didn't I understand your reply?

How am I supposed to run two services in the same port in the same server?
Could you please clarify?

BTW, I am using Windows server 2012 and IIS.

Cheers.

JJ.

-----Original Message-----
From: Passmore, James H. [mailto:jpass@anonymised.com]
Sent: 27-Jul-15 2:24 AM
To: Jair Santos <jsantos5954@anonymised.com>
Subject: RE: [Geoserver-users] WMS application

You probably have an issue with JavaScript cross origin policy, having the
services on the same server is not enough, you need to run on the same port.

What happens if you proxy the GeoServer service through apache so it appears
to be on port 8080.

James

-----Original Message-----
From: Jair Santos [mailto:jsantos5954@anonymised.com]
Sent: Sunday, July 26, 2015 8:36 PM
Cc: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] WMS application

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&quot;&gt;&lt;/script&gt;
    </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:ben@anonymised.com]
Sent: 22-Jul-15 8:00 PM
To: Jair Santos <jsantos5954@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
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:ben@anonymised.com]
> 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-quic
> ks
> 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:ben@anonymised.com]
>> 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
>>> Geoserver-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>>
>>
>> --
>> Ben Caradoc-Davies <ben@anonymised.com> Director Transient Software
>> Limited <http://transient.nz/&gt; New Zealand
>>
>> -------------------------------------------------------------------
>> --
>> -
>> ------
>> --
>> _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>>
>> -------------------------------------------------------------------
>> --
>> -
>> -------- _______________________________________________
>> Geoserver-users mailing list
>> Geoserver-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>>
>
> --
> Ben Caradoc-Davies <ben@anonymised.com> Director Transient Software
> Limited <http://transient.nz/&gt; New Zealand
>
> --------------------------------------------------------------------
> --
> ------
> --
> _______________________________________________
> Geoserver-users mailing list
> Geoserver-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/geoserver-users
>
>
>

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt; New Zealand

----------------------------------------------------------------------
------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------
-------- _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

________________________________
This message (and any attachments) is for the recipient only. NERC is
subject to the Freedom of Information Act 2000 and the contents of this
email and any reply you make may be disclosed by NERC unless it is exempt
from release under the Act. Any material supplied to NERC may be stored in
an electronic records management system.
________________________________

Jair,

your service URL is missing the "http://". See the documentation:
http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS-js.html

Please change "localhost:8081/geoserver/wms" to "http://localhost:8081/geoserver/wms&quot;\.

Your example worked for me if I put your HTML in a local file and GeoServer on port 8080. I tested it with the topp:states layer in Firefox 38.

Kind regards,
Ben.

On 28/07/15 06:34, Jair Santos wrote:

Thank you Stefano. That helps.

The answer is yes, I can see the map from this link.

I just can't see anything wrong with code. I pretty much copied and changed the line to

var wms = new OpenLayers.Layer.WMS( "OpenLayers WMS",
      "localhost:8081/geoserver/wms", {layers: 'Img_Sample'} );

If anybody has any thoughts please share it. I'll try the open layers list though.

JJ.

-----Original Message-----
From: Stefano Costa [mailto:stefano.costa@anonymised.com]
Sent: 27-Jul-15 1:56 AM
To: Jair Santos <jsantos5954@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] WMS application

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&quot;&gt;&lt;/script&gt;
     </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:ben@anonymised.com]
Sent: 22-Jul-15 8:00 PM
To: Jair Santos <jsantos5954@anonymised.com>
Cc: geoserver-users@lists.sourceforge.net
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:ben@anonymised.com]
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-quic
ks
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:ben@anonymised.com]
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
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <ben@anonymised.com> Director Transient Software
Limited <http://transient.nz/&gt; New Zealand

-------------------------------------------------------------------
--
-
------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

-------------------------------------------------------------------
--
-
-------- _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <ben@anonymised.com> Director Transient Software
Limited <http://transient.nz/&gt; New Zealand

--------------------------------------------------------------------
--
------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt; New Zealand

----------------------------------------------------------------------
------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

----------------------------------------------------------------------
-------- _______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand

On 28/07/15 06:51, Jair Santos wrote:

Hi James and thank you for your response. AFAIK the web site and geoserver
can be in different servers. Or didn't I understand your reply?

This is not the problem in this case. Only some types of services (e.g. XML) are affected by JavaScript cross-origin rules. Images, such as those served by WMS, are not affected. This is what makes it easy to add multiple WMS layers from various servers to an OpenLayers map. See:
https://en.wikipedia.org/wiki/Same-origin_policy

OpenLayers can consume WFS services, which *are* affected by the same-origin rule, but your example does not use WFS. For WFS, you can use a reverse proxy to access the service from JavaScript.

How am I supposed to run two services in the same port in the same server?
Could you please clarify?

If you ever need to do this, you can use a proxy that sits in front of Tomcat and passes requests to it. Different request paths are dispatched to different servers. Apache HTTP Server can do this, and I expect IIS can as well. Straightforward to set up, and very useful in production, but not needed to fix your current problem. In production, everything must be on port 80 or 443 as firewalls typically block everything else.

Kind regards,

--
Ben Caradoc-Davies <ben@anonymised.com>
Director
Transient Software Limited <http://transient.nz/&gt;
New Zealand