Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

OpenLayers that is not minified?

Tags:

openlayers-3

I'm trying to find an OpenLayers3.js file that is not minifed, it is a pain debugging stuff that is minified, can anyone help me find it?

Im using this address now: http://openlayers.org/en/v3.0.0/build/ol.js

By the way, it is a special thingy at the top. See the website: http://ol3.js.org/ ? Made me laugh.

Help?

like image 310
petur Avatar asked Oct 23 '14 14:10

petur


People also ask

What is OpenLayers?

OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds. It is completely free, Open Source JavaScript, released under the 2-clause BSD License (also known as the FreeBSD).

Can OpenLayers display map data?

It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds. It is completely free, Open Source JavaScript, released under the 2-clause BSD License (also known as the FreeBSD).

Where can I download the full distribution of OpenLayers?

The full distribution can be downloaded from the release page. OpenLayers makes it easy to put a dynamic map in any web page. It can display map tiles, vector data and markers loaded from any source. OpenLayers has been developed to further the use of geographic information of all kinds.

Is leaflet a good alternative to OpenLayers?

I found Leaflet very simple to use, a petite 64K size, compared to over 700K Openlayers, and in very few steps you can create apps that have the freshness and eye-candy of today's web and mobile GIS apps. Your stack - GeoServer, PostGIS etc., is a standard stack, so OpenLayers or Leaflet could easily be incorporated.


2 Answers

If you need the unminified ol, you can use the one from ol:

http://openlayers.org/en/v3.0.0/build/ol-debug.js

It's a file of 3.5M so don't use this in production ;)

like image 197
markov00 Avatar answered Sep 19 '22 14:09

markov00


Yes, http://openlayers.org/en/v3.0.0/examples/loader.js will load all the raw files -- basically by writing out a bunch of script tags. As @lexicore has already said, you can get the source from github, though this involves setting up nodejs locally to run (which actually isn't that painful, but more so than just debugging from a hosted source). Take a look at package.json to get a feel for how much has gone into OpenLayers 3.

If you go to the OpenLayers 3 examples, for example animation, change production to development in the drop down, and then do view source, you will get the link above. You can also see all the raw js files in the Javascript console.

EDIT: I put some instructions, following the official OL dev page, on how to build/run locally, which will also get you the unminified OL source code

like image 25
John Powell Avatar answered Sep 18 '22 14:09

John Powell