[Geoserver-users] Openlayers library

Hello List,
i downloaded openlayers, i am working with eclipse and i want to know where to put the openlayers library.
i am still a newbie in openlayers. will you please give me a step by step answer
Thank you.


Khaoula MIMID

Élève ingénieur - 3ème Sciences d’Information Géographique

Ecole Hassania des Travaux Publics
Tél : (+212) 06 11 95 37 52
E-mail : khaoula.mimid@anonymised.com


You might want to post to the OpenLayers mailing list.
Alternately, google for “OpenLayers Tutorial”.

You’ll want to place openlayers in your web directory. GeoServer includes a copy.

On 18 March 2013 16:10, Khaoula MIMID <khaoula.mimid@anonymised.com> wrote:

Hello List,
i downloaded openlayers, i am working with eclipse and i want to know where to put the openlayers library.
i am still a newbie in openlayers. will you please give me a step by step answer
Thank you.


Khaoula MIMID

Élève ingénieur - 3ème Sciences d’Information Géographique

Ecole Hassania des Travaux Publics
Tél : (+212) 06 11 95 37 52
E-mail : khaoula.mimid@anonymised.com



Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.

i am sorry to bother you again
Is this the tutorial i need : https://sites.google.com/site/freeandopensource007/tutorials/tutorial1

···

2013/3/18 Jonathan Moules <jonathanmoules@anonymised.com>

You might want to post to the OpenLayers mailing list.
Alternately, google for “OpenLayers Tutorial”.

You’ll want to place openlayers in your web directory. GeoServer includes a copy.

On 18 March 2013 16:10, Khaoula MIMID <khaoula.mimid@anonymised.com.84…> wrote:

Hello List,
i downloaded openlayers, i am working with eclipse and i want to know where to put the openlayers library.
i am still a newbie in openlayers. will you please give me a step by step answer
Thank you.


Khaoula MIMID

Élève ingénieur - 3ème Sciences d’Information Géographique

Ecole Hassania des Travaux Publics
Tél : (+212) 06 11 95 37 52
E-mail : khaoula.mimid@anonymised.com



Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar


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

This transmission is intended for the named addressee(s) only and may contain sensitive or protectively marked material up to RESTRICTED and should be handled accordingly. Unless you are the named addressee (or authorised to receive it for the addressee) you may not copy or use it, or disclose it to anyone else. If you have received this transmission in error please notify the sender immediately. All email traffic sent to or from us, including without limitation all GCSX traffic, may be subject to recording and/or monitoring in accordance with relevant legislation.


Khaoula MIMID

Élève ingénieur - 3ème Sciences d’Information Géographique

Ecole Hassania des Travaux Publics
Tél : (+212) 06 11 95 37 52
E-mail : khaoula.mimid@anonymised.com


In your web pages, you include Openlayers with
<script src=path>
Now that "path" can (and often is) a URL to a completely different site. Eg, you could link directly to Openlayers by making this
src ="http://dev.openlayers.org/releases/OpenLayers-2.12/OpenLayers.js&quot; and not have OL in your war at all.

However, I like to have control over what my JS my page is using, use custom build of OL etc. The simple approach is have OL as a subdirectory of your eclipse WebContent directory. You reference in your index.html in the same directory with src="OpenLayers/OpenLayers.js". A better approach though is have your javascript libraries in a completely separately project. That way you have multiple web projects using the same openlayers library and save yourself a maintenence nightmare. I have a project called JsLibrary in which I place OL (as subdirectory of WebContent) along with a other common JS library. There isnt any need to package a war though you can do so. What you need to do is setup a JsLibrary context on the same http server. When done, you project then references OL through src="/JsLibrarp/OpenLayers/OpenLayers.js".

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.

Hello,
Thank you for your answer.
i would like to use your second suggestion :
-create a new web project JSLibrary
-In web content i copy the unziped folder openLayers-2.12

  • when i want to refer to it in another web project : src=“/JsLibrarp/OpenLayers/OpenLayers.js”
    Is that so?
    one more thing : when i imoprt the folder openlayers2-12 to a project, i get a red cross on it like if there are errors in the .js pages. Shall i ignore that
    thank you
···

2013/3/18 Phil Scadden <p.scadden@anonymised.com>

In your web pages, you include Openlayers with

Now that "path" can (and often is) a URL to a completely different site. Eg, you could link directly to Openlayers by making this src ="[http://dev.openlayers.org/releases/OpenLayers-2.12/OpenLayers.js](http://dev.openlayers.org/releases/OpenLayers-2.12/OpenLayers.js)" and not have OL in your war at all. However, I like to have control over what my JS my page is using, use custom build of OL etc. The simple approach is have OL as a subdirectory of your eclipse WebContent directory. You reference in your index.html in the same directory with src="OpenLayers/OpenLayers.js". A better approach though is have your javascript libraries in a completely separately project. That way you have multiple web projects using the same openlayers library and save yourself a maintenence nightmare. I have a project called JsLibrary in which I place OL (as subdirectory of WebContent) along with a other common JS library. There isnt any need to package a war though you can do so. What you need to do is setup a JsLibrary context on the same http server. When done, you project then references OL through src="/JsLibrarp/OpenLayers/OpenLayers.js". 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. ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: [http://p.sf.net/sfu/appdyn_d2d_mar](http://p.sf.net/sfu/appdyn_d2d_mar) _______________________________________________ Geoserver-users mailing list [Geoserver-users@anonymised.comsts.sourceforge.net](mailto:Geoserver-users@lists.sourceforge.net) [https://lists.sourceforge.net/lists/listinfo/geoserver-users](https://lists.sourceforge.net/lists/listinfo/geoserver-users)


Khaoula MIMID

Élève ingénieur - 3ème Sciences d’Information Géographique

Ecole Hassania des Travaux Publics
Tél : (+212) 06 11 95 37 52
E-mail : khaoula.mimid@anonymised.com


-create a new web project JSLibrary
-In web content i copy the unziped folder openLayers-2.12

  • when i want to refer to it in another web project : src=“/JsLibrarp/OpenLayers/OpenLayers.js”
    Is that so?

A very important step is configuring the context /JsLibrary in your web server. I use apache and configure the with Proxypass in the conf.d/conf file.

one more thing : when i imoprt the folder openlayers2-12 to a project, i get a red cross on it like if there are errors in the .js pages. Shall i ignore that
thank you

No idea sorry. I havent used Eclipse in quite a while. But I would ignore it - the ol files work fine.

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.