Commit Graph
100 Commits
Author SHA1 Message Date
Tim Schaub 9c4689206b Document stability for options 2014-08-21 22:14:48 -06:00
Tim Schaub 525456e6cd Only document olx properties marked as part of the API
And mark all olx properties with @api.  The stability level will be used to determine what can change between minor releases.
2014-08-21 21:49:06 -06:00
Tim Schaub bc680ef101 Write out stability info for symbols 2014-08-20 16:17:27 -06:00
Tim Schaub f498080d78 Fail if tasks have lint 2014-08-19 12:15:11 -06:00
Tim Schaub 30bfa1bf19 Remove additional lint from new tasks 2014-08-19 12:15:11 -06:00
Tim Schaub 6bd0d7efae Additional documentation 2014-08-19 10:30:38 -06:00
Tim Schaub 1ede97ae18 Respect the tileSize option for XYZ grids 2014-08-19 10:30:37 -06:00
Tim Schaub ee487ca308 Sources may be configured with a projection, tile grids with an extent
An XYZ tile grid is constructed with an extent defining the bounds of the tile grid.
2014-08-19 10:30:27 -06:00
Tim Schaub e97f79b4ab Respect XYZ source projection 2014-08-18 23:03:33 -06:00
Tim Schaub 33b68123ac Add jshint config for tasks and remove lint 2014-08-18 17:22:57 -06:00
Tim Schaub 63ad916ca7 Function for creating tile grids from extents 2014-08-18 17:10:26 -06:00
Tim Schaub dd5e7693da General purpose getCorner function for extents 2014-08-18 14:55:49 -06:00
Tim Schaub bdfceaad06 Run closure-util install script after install
This needs to be run whenever our closure-util.json config changes.  It is harmless to run multiple times.
2014-08-08 11:08:37 -07:00
Tim Schaub c3bddffecb Unconditionally add version info to the build header
This reworks the changes in #2442 so we always include the version info, regardless of whether the module is run as main or not.  This also addresses a few lint related issues.
2014-07-25 12:50:58 -06:00
Tim Schaub d846fbc0b4 Correct link to API docs 2014-07-24 14:32:34 -06:00
Tim Schaub caa0b568ad Remove extent option for sources
Most of our uses of source extent were cargo cult programming.  The source extent was seldom and inconsistently used.  Instead, layers can now be configured with an extent, and layer renderers limit rendering (and data requests) to the layer extent.

For vector sources, the `getExtent` method returns the extent of currently loaded features (this was the case before and after this change).  For tile based sources, we will likely want to allow easy construction of tile grids based on an extent (this is not possible before or after this change, but could be added later).
2014-07-24 10:30:06 -06:00
Tim Schaub 7bbd27e68e ol.tilegrid.TileGrid doesn't accept an extent option
Tile grids cannot currently be constructed with an extent (though we should perhaps provide a function that allows this - see https://github.com/tschaub/ol3/commit/68815dca10ef006294c767efe9592b682c48dc5f for an example).
2014-07-24 10:26:07 -06:00
Tim Schaub 2b0284a342 Only request tiles within the layer extent
Layer renderers are now responsible for requesting data within a limited extent.
2014-07-24 10:26:07 -06:00
Tim Schaub 234cff4de5 Limit image layer requests to layer extent
This has two nice consequences that can be seen in the wms-image.js and mapbuide-untiled.js examples:
 * no images are requested when you browse outside of the layer extent
 * when the layer extent is within the viewport extent, cached images are used since the intersecting extent is the same for multiple viewport extents
2014-07-24 10:26:07 -06:00
Tim Schaub 1daf36956c Layer extent option
If provided, the layer extent will be used to limit data requests and rendering.  If undefined, to limit will be imposed.
2014-07-24 10:26:07 -06:00
Tim Schaub 42f953d08d Function for getting extent intersection 2014-07-24 10:26:07 -06:00
Tim Schaub 288c997322 Build css if source is newer
Previously, build/ol.css wasn't getting rebuilt on updates to css/ol.css.
2014-07-22 14:04:52 -06:00
Tim Schaub aa4ee80033 Removing unused ol.proj.CH 2014-07-21 09:28:48 -06:00
Tim Schaub e9c6e58663 Removing the build-all target
The ol-all.json and ol.json build configurations differ only in their use of the manage_closure_dependencies Compiler option.  I don't think there is value in running both (there are plenty of other compiler options that we don't exercise in this same way).
2014-07-17 21:48:53 -06:00
Tim Schaub 737e063937 Two ways to run the hosted examples: compiled and raw
When viewing the hosted examples, people can load the compiled version of the library or load each script individually.
2014-07-17 21:42:55 -06:00
Tim Schaub 4dc601f30d Generate a ol-debug.js script useful for debugging
Instead of running everything through the Compiler just to remove whitespace, we provide a build that is a simple concatenation of all scripts in dependency order.  This build (ol-debug.js) should never be used in production (the same applies to the old ol-whitespace.js build).  Instead, the intention is that it be used to aid in debugging during development.
2014-07-17 21:33:02 -06:00
Tim Schaub 28a23a11b5 Remove ol-simple.js build
We've proven that we can, but that doesn't mean we should be building with `SIMPLE_OPTIMIZATIONS`.
2014-07-17 21:31:58 -06:00
Tim Schaub b0c0d077c9 Annotate always and never conditions as functions 2014-07-16 23:16:51 -06:00
Tim Schaub 12d94e1405 Document ol.inherits and annotate as a function 2014-07-16 23:16:30 -06:00
Tim Schaub 1657ed2d23 Make ol.proj.METERS_PER_UNIT exportable
We need to apply the `@api` annotation to the object itself in order for it to be exportable.
2014-07-15 15:49:48 -06:00
Tim Schaub aecaa52cb1 Make our build configs more portable by using the default src config
If a `src` config is not provided, by default, all of the library sources are included.  There is some special handling in the build task to make sure all library sources are included regardless of the path to the build config.  When someone includes a `src` config, path patterns are assumed to be relative to the current working directory (unless overriden with the `cwd` config).  So, when you use the `src` config, your config is no longer portable.
2014-07-14 17:52:10 -06:00
Tim Schaub 4f7073d7aa For jsdoc to find plugins, we need to set the cwd
This allows the `build.js` (and the exports from `generate-info.js`) to be run with a different working directory.
2014-07-14 14:42:42 -06:00
Tim Schaub 4de2520109 Add packages required to build the library to dependencies
This allows other packages to depend on the ol3 package and get the build tools (devDependencies are not installed when they are transitive dependencies).  The justification here is that the ol3 package becomes useful to other packages when you are able to run the build.js task.  For this task to run all of its dependencies must be available.
2014-07-14 14:19:24 -06:00
Tim Schaub f5830cc8e5 Unused JAVA executable 2014-07-12 14:46:05 -06:00
Tim Schaub 5010596ec0 Unused JAR executable 2014-07-12 14:45:20 -06:00
Tim Schaub db431ebdc6 No reason for build.py to run generate-exports.js
The doc task does not use the generated exports.js file.
2014-07-12 14:43:50 -06:00
Tim Schaub df2c14b7af Remove unnecessary linting of generated exports file 2014-07-12 14:43:50 -06:00
Tim Schaub c93e80a14a Always regenerate info using all sources if any have changed
Because we don't know if a new or modified file includes changes to the class hierarchy, we regenerate info for all sources any time any one has changed.  An alternative would be to generate info first for the new or modified file and then (potentially) regenerate info for more source files in the class hierarchy, but this makes the generate-info.js task far more complicated.
2014-07-12 14:39:18 -06:00
Tim Schaub a6f921d443 To force a download by setting the href, we need synchronous rendering 2014-07-11 21:49:57 -06:00
Tim Schaub 3e23da7c83 Minify CSS 2014-07-11 21:25:21 -06:00
Tim Schaub aa4dbde841 Remove static and other attributes from the docs 2014-07-11 19:47:49 -06:00
Tim Schaub 521cbfb1b0 Make internal proj constructors private 2014-07-10 16:37:07 -06:00
Tim Schaub 9c6cb9db6d Use goog.dom.fullscreen 2014-07-06 16:03:09 -06:00
Tim Schaub d0301805c7 Doc flip 2014-07-06 15:26:04 -06:00
Tim Schaub 1f88015db0 Add ol.proj.transformExtent function 2014-07-06 13:22:47 -06:00
Tim Schaub 21878ebad3 Lint 2014-07-06 12:47:33 -06:00
Tim Schaub 7e8551a767 Unused extensions 2014-07-06 12:43:55 -06:00
Tim Schaub 93716fc7f0 Extend expect.js rather than modify the source 2014-07-06 12:40:03 -06:00
Tim Schaub d8ca8e7341 Update test readme 2014-07-06 11:53:34 -06:00
Tim Schaub 264a01cfd4 Add jquery as a dev dependency 2014-07-06 11:47:58 -06:00
Tim Schaub 8a3f1a8f34 Add mocha and mocha-phantomjs as dev dependencies 2014-07-06 11:40:08 -06:00
Tim Schaub 70cb7a4a0a Add sinon as a dev dependency 2014-07-06 11:21:01 -06:00
Tim Schaub b452e04e08 Add a task to run the tests once with PhantomJS
The test.js task starts the development server and runs the tests in PhantomJS.  As mentioned in the readme, when running the tests continuously during development, it is more convenient to start the dev server and visit the root of the test directory in your browser.

Later we can bring in Karma to drive PhantomJS and other browsers, but this simple "run once" task is useful for the CI job.
2014-07-05 19:42:30 -04:00
Tim Schaub 5a24d022cf Extra annotations for build.py as well 2014-07-05 16:19:41 -04:00
Tim Schaub d99a61545c Use @observable annotation instead of @todo observable 2014-07-05 16:16:44 -04:00
Tim Schaub fd659d63e9 Remove @todo stability annotation (this has no effect) 2014-07-05 16:16:34 -04:00
Tim Schaub 10f4d0c3d7 Removing old code 2014-07-05 15:54:44 -04:00
Tim Schaub 8b29b52e95 Document olx.format.PolylineOptions
This was mistakenly annotated with `@todo stability` (which does nothing).
2014-07-05 15:43:03 -04:00
Tim Schaub 4cf5ab4620 Use @api annotation instead of @todo api 2014-07-05 15:41:14 -04:00
Tim Schaub 4b57f7798f Use goog.dom.classlist functions
The goog.dom.classes functions have now been deprecated.  See https://github.com/google/closure-library/commit/97e8a0c0fc7238a56cc4dacd4a96fd4c0735b992
2014-07-01 14:09:28 -04:00
Tim Schaub 97985934e1 Remove libtess.js 2014-07-01 08:45:09 -04:00
Tim Schaub a8a035468b Allow cwd to be configured for build
By default, all paths in the build config (e.g. externs) are assumed to be relative to the ol3 repo root.  To make it so relative paths are resolved from a different directory, use the cwd option.

In addition, this change makes it so the `build.js` task can be run from another directory.
2014-06-29 15:02:47 -04:00
Tim Schaub fb7d39005e Unused var 2014-06-29 12:55:30 -04:00
Tim Schaub 2f5a92c2c9 Treat classdesc as description 2014-06-28 10:46:36 -04:00
Tim Schaub 2ec63b6c58 Unnecessary ol.Tile requires 2014-06-27 19:57:54 -04:00
Tim Schaub 997517110c Unnecessary ol.Image require 2014-06-27 19:51:38 -04:00
Tim Schaub e802902f9b Rename ol.extent.getForView2DAndSize to ol.extent.getForViewAndSize 2014-06-27 09:59:39 -04:00
Tim Schaub 9565e17ee0 Rename ol.View2DProperty to ol.ViewProperty 2014-06-27 09:59:39 -04:00
Tim Schaub 878dcd1d28 Rename olx.View2DOptions to olx.ViewOptions 2014-06-27 09:59:39 -04:00
Tim Schaub 47d37fabea Rename ol.View2D to ol.View 2014-06-27 09:59:39 -04:00
Tim Schaub b9f444a008 Rename olx.View2DState to olx.ViewState and use viewState property 2014-06-27 09:58:25 -04:00
Tim Schaub 2e88f911dd Rename view.getView2DState() to view.getState() 2014-06-27 09:52:19 -04:00
Tim Schaub b88d2aebc9 Remove view.getView2D() method 2014-06-27 09:52:19 -04:00
Tim Schaub 956e1bf8b4 Remove ol.View base class 2014-06-27 09:52:19 -04:00
Tim Schaub 3c1cb55079 Remove IView and IView2D 2014-06-27 09:52:19 -04:00
Tim Schaub c74f945817 Remove IView3D 2014-06-27 09:52:19 -04:00
Tim Schaub d5de99bcf7 Add symbol kind to info 2014-06-25 11:11:22 -04:00
Tim Schaub 94f0513aa1 Update closure-util
The closure-util package works on Node 0.8, 0.10, and 0.11 (as of this writing), but it requires an updated version of npm to install on Node 0.8.  For the build to pass on Travis, we update npm before installing other dependencies.  For others who are installing the openlayers package, nothing special is required for Node 0.10 and above.  For users on Node 0.8, the openlayers package will only install with an updated version of npm.  This can be installed with npm itself.

    npm install -g npm # only needed on Node 0.8
2014-06-13 10:48:10 -07:00
Tim Schaub a9fc53e8da Make frameState property of ol.MapEvent exportable 2014-06-03 12:45:45 -06:00
Tim Schaub 0f04236fc4 Make map property of ol.MapEvent exportable 2014-06-03 12:45:03 -06:00
Tim Schaub 559feba1ed Add interface for map events so properties can be disambiguated 2014-06-03 12:43:45 -06:00
Tim Schaub 13d964488f Make getFeatureById method exportable 2014-06-03 11:42:47 -06:00
Tim Schaub 08ae509a7f Export method to get resolution for extent and size
While this is straightforward to calculate, this method adds convenience.
2014-05-29 11:21:31 -06:00
Tim Schaub 9323bbdcd0 Give Somaliland and Northern Cyprus unique ids 2014-05-26 10:31:27 -06:00
Tim Schaub a2b81d6bd0 Disallow adding the same feature twice 2014-05-23 16:52:11 -06:00
Tim Schaub 652f11cefa Provide a method for retrieving features by id 2014-05-23 16:35:07 -06:00
Tim Schaub 34cabd1579 Dispatch change on feature id change 2014-05-23 16:35:06 -06:00
Tim Schaub 25aefbeff5 Remove simple build profile
This was inadvertently added in d163f60e34 (see #2075).  Thanks @probins for the heads up.
2014-05-23 10:20:24 -06:00
Tim Schaub 097909516a Account for null or undefined geometry
The change in #2098 made it so a feature's geometry could be undefined.  This is consistent with the return type for the getGeometry method.  Where calling code needs to ensure that it has a geometry instance, it can use instanceof, goog.isDefAndNotNull(), or test for a truthy value.
2014-05-23 10:00:15 -06:00
Tim Schaub be03ec5aa1 Update dependencies
* closure-util@0.12.0 - force inclusion of deps.js files when compiling
 * jshint@2.5.1 - various enhancements and fixes (https://github.com/jshint/jshint/compare/2.4.4...2.5.1)
 * walk@2.3.3 - directory exclusion fix
2014-05-21 12:08:46 -06:00
Tim Schaub a4d31147bc Do not set geometry by default
A feature can have a geometry whose value is an ol.geom.Geometry instance or null.  A feature can also have no geometry property.  By default, a feature has no geometry property.  To set a geometry, one can be passed to the constructor (including null) or passed to setGeometry().
2014-05-21 09:16:54 -06:00
Tim Schaub c820a7a1f8 Additional doc for the namespace option
People should be discouraged from exporting to single letter namespaces to avoid collissions with the symbols generated by the compiler.
2014-05-21 13:22:40 +02:00
Tim Schaub 250f6901d3 Pass around single config object 2014-05-21 13:22:32 +02:00
Tim Schaub 3793f33acf Handle minZoom in getZoom and setZoom 2014-05-16 04:56:42 -06:00
Tim Schaub 815f5b38c8 Accept resolution or zoom related options for constrained views
Any of minResolution, maxResolution, minZoom, or maxZoom can be used to constrain the view resolutions.  Resolution options are given precedence over zoom options.
2014-05-15 17:31:55 -06:00
Tim Schaub 049531831c Move stability and inherited indicators after names 2014-05-14 16:27:30 -06:00
Tim Schaub 8fbf67b7e6 Remove space between ol. and Name 2014-05-14 16:26:44 -06:00
Tim Schaub 3a0efe83c5 Update map example 2014-05-14 15:11:12 -06:00
Tim Schaub df05e9da11 Fire moveend only once after view settles 2014-05-14 14:23:31 -06:00
Tim Schaub c3184f2cce Support for debug builds (concatenation only)
Whitespace builds are still painful to debug.  Skipping the compiler altogether and simply concatenating sources is a better option for development and debugging.  By ommitting the `compile` option in a build config, the output is "uncompiled" - a straight concatenation of all sources in dependency order.
2014-05-14 10:39:51 -06:00