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 <[email protected]>

> 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";
> 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
> _______________________________________________
> Geoserver-users mailing list
> [email protected]
> 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 : *[email protected]*

_____________________________________

*
<[email protected]>*
------------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to