Commit Graph

1100 Commits

Author SHA1 Message Date
Tom Payne
0bb31150b0 Merge pull request #148 from twpayne/anchored-elements
Replace ol.overlay.Overlay with ol.AnchoredElement
2013-01-24 09:36:40 -08:00
Éric Lemoine
dc9fb06185 Remove ref to userProjection
The wms-custom-proj example sets a userProjection in the map while userProjection is gone for now. It was removed in 927cffb2.
2013-01-24 10:32:32 +01:00
Frederic Junod
7568688301 Use option object rather than positional arguments for ol.animation.create* functions 2013-01-23 17:07:55 +01:00
Tom Payne
dda51ecec2 Replace ol.overlay.Overlay with ol.AnchoredElement
This commit adds several features:
- rename of class to better reflect its behaviour
- full ol.Object support
- integration with postrender event for integration with animations and
  render loop
- minimised DOM modifications
- more precise positioning
- element placed in DIV to avoid modifications to user-supplied element
- correctly handle changes to the positioning property
2013-01-22 15:12:25 +01:00
Frederic Junod
be64408728 Export map as jpeg instead of png 2013-01-21 16:13:19 +01:00
Frederic Junod
8cbe0fbbbb Export canvas map as jpeg image 2013-01-21 16:08:33 +01:00
Frederic Junod
8825251c42 Add new ol.easing.elastic and ol.easing.bounce easing functions. 2013-01-21 09:48:56 +01:00
Tom Payne
f3978d200f Use Alt+Shift to rotate by default, refs #21 2013-01-18 14:09:32 +01:00
Tom Payne
bb51709945 Use OpenStreetMap tiles in canvas tiles example
Stamen exports aren't quite right yet.
2013-01-18 00:34:44 +01:00
Tom Payne
5eeec41877 Add canvas renderer to two layers demo 2013-01-17 13:54:52 +01:00
Tom Payne
aeef260101 Add canvas renderer to side-by-side demo 2013-01-17 13:54:52 +01:00
ahocevar
7c05587aed Merge pull request #114 from ahocevar/resolutions
Use validity extent to generate default resolutions. r=@twpayne,@elemoine
2013-01-16 07:17:10 -08:00
Éric Lemoine
0d87c2c14c Merge pull request #91 from elemoine/bingkey
Bing maps key will expire on 15 Jan 2013
2013-01-16 03:32:27 -08:00
Éric Lemoine
0c1116fe95 Update Bing maps key 2013-01-16 12:31:25 +01:00
Tom Payne
11ec1de89b Refactor mouse position control to use postrender event 2013-01-16 11:25:59 +01:00
Tom Payne
936132cd46 Update examples to read renderer from query string 2013-01-15 10:26:43 +01:00
ahocevar
87ce763ccb Use validity extent to generate default resolutions
Previously, the TiledWMS source generated a resolutions array
derived from the world extent in meters, to match the default
Web Mercator resolutions of the map. This wouldn't work for
projections with distance units different than meters. It is
better to commit to a default resolutions array where zoom level
0 is the validity extent of the projection (not the Web Mercator
world extent!) at a 256 pixel tile size.
2013-01-14 16:10:55 +01:00
Tom Payne
434dd84c04 Add animation examples to side-by-side demo 2013-01-11 15:49:15 +01:00
Tom Payne
878122828b Add canvas tiles example 2013-01-11 01:18:58 +01:00
Éric Lemoine
927cffb2b7 Add view abstraction 2013-01-09 14:03:16 +01:00
Tom Payne
7f63e3b8e7 Propagate query string to example links 2013-01-03 11:50:44 +01:00
tschaub
9622395c86 Use radians for hue rotation
This commit is a cherry-pick from 7f578f0.

Conflicts:

	src/ol/renderer/dom/domlayerrenderer.js
2012-12-12 15:22:01 +01:00
tschaub
4d97b583c6 Match the current Filter Effects spec
This commit is a cherry-pick of 19f7778.

The current draft of the [filter spec](https://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html)
describes brightness, contrast, hue-rotate, and saturate functions that
roughly match our layer's setBrightness, setContrast, setHue, and
setSaturation methods.  These changes make the range of our methods match
the corresponding functions in the spec.  The one exception is the
brightness function.  The spec says it has a range of 0 to positive infinity.
The WebKit implementation accepts a range of -1 to 1 (as of
https://github.com/WebKit/webkit/commit/8f4765e569).  There's an open
(ticket)[https://www.w3.org/Bugs/Public/show_bug.cgi?id=15647] recommending
that the spec be changed to match.

I'm not stuck on having our methods match those of the filter spec, but the
parity would be nice.

These changes leave the WebGL map renderer "broken" (whacky colors).  It would
be straightforward to update the current fragment shader to handle the new
range of hue, but the brightness, contrast, and saturation handling will
need to be reworked.

For inspiration, here are the color transformation
matrix calculations the WebKit filters:
8f4765e569/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurfaceFilters.cpp (L64-80)

Conflicts:

	src/ol/renderer/dom/domlayerrenderer.js
2012-12-12 15:18:34 +01:00
Frederic Junod
6eb505eb2b Remove question mark from wms urls (see #85) 2012-11-08 09:02:03 +01:00
ahocevar
3d84571043 Use WebGL now that server sends CORS headers (see #75) 2012-11-03 10:33:20 +01:00
Frederic Junod
127c00e1ea Use jpeg tiles for background layer 2012-11-02 15:52:34 +01:00
ahocevar
eb4a8683e2 Projection handling improvements
* The Map's private createProjection_ method is now a public
  method of the Projection. It is also used by TiledWMSSource
  to calculate the appropriate projection from the user
  configuration.
* ol.Projection.addProjection now adds the transformation for
  the source == target case. This makes it easy for the user
  to create custom projection maps without including proj4js and
  without adding a custom transformation, as long as the
  userProjection equals the projection.
* The TiledWMSSource now uses the same default resolutions as
  the map (i.e. the OSM resolutions)
* The modulo calculation for wrapping extents now works for all
  grid configurations, by not calculating the number of columns
  based on an assumption about the way the zoom levels relate to
  resolutions.
* The wms-custom-proj example now shows how to properly
  configure a custom resolution, i.e. by using the validity
  extent of the projection as its extent.
2012-10-31 13:17:58 +01:00
ahocevar
393bb36784 Removing standalone example 2012-10-29 09:36:08 +01:00
ahocevar
b170fa3d16 Using DOM renderer; no custom extent for layers
The server does not send CORS headers, so we cannot use the
WebGL renderer. Since the layers use the projection's extent,
it is not necessary to specify the extent.
2012-10-29 09:34:53 +01:00
ahocevar
0c77aacf33 proj4js externs are not necessary 2012-10-29 09:33:00 +01:00
ahocevar
e672083027 Indentation and line break fixes 2012-10-28 23:59:36 +01:00
Cédric Moullet
bb957a1149 Add new layer national park, attributions and layer extent to the Tiled WMS with custom projection example 2012-10-28 23:43:53 +01:00
Cédric Moullet
b907befd68 Add title to WMS tiled custom projection example 2012-10-28 23:42:58 +01:00
Cédric Moullet
dd93c24a07 Add tiled wms with custom projection 2012-10-28 07:26:05 +01:00
ahocevar
e5308fec40 No extent magic
Setting the extent on a tile source now only means that tiles
won't be drawn outside that extent. Now the only way to specify
the origin of the tile grid is to provide a custom tileGrid. By
default, the grid origin is the top left corner of the
projection's extent.
2012-10-27 17:28:08 +02:00
ahocevar
b872b5a74f Cross origin handling to make example work in Firefox
The WMS used in the example does not send CORS headers (I think
not many WMS services do). It seems that the WebGL renderer
needs script access to the image data, so the example only works
with the DOM renderer in Firefox.
2012-10-27 09:16:09 +02:00
ahocevar
084506cdb5 Adding tiled WMS source
As shown in the example, this adds support for tiled WMS layers.
2012-10-26 21:36:30 +02:00
Éric Lemoine
0ae3f8806e Remove examples/index.js (refs #67) 2012-10-21 21:24:15 +02:00
Éric Lemoine
7ce79207e3 Better design for the full-screen examples
The text div is now placed in the top-right corner of the page. This is to avoid overlapping with the attribution div. On screens that are smaller that 600px the text div is not deplayed at all.
2012-10-21 21:11:27 +02:00
Éric Lemoine
1e0b43dd00 Better HTML and CSS for the examples
And give the h1 tags a "title" id. The exampleparser.py script uses that as the example title in the index page.
2012-10-20 21:43:34 +02:00
Éric Lemoine
b000c052e3 Improve layout of examples index page 2012-10-20 21:43:05 +02:00
Éric Lemoine
3e3b8d6f8b Use OpenLayers 2 examples index 2012-10-19 21:56:59 +02:00
Tom Payne
ee1d1fa3e7 Fold ol.CoordinateFormat into ol.Coordinate 2012-10-18 14:22:23 +02:00
Tom Payne
061c173e64 Merge pull request #64 from twpayne/examples-index
Examples index
2012-10-18 02:15:46 -07:00
Tom Payne
e21c182641 Use Chrome Frame if available 2012-10-17 18:20:25 +02:00
Tom Payne
e9dbb00039 Pass query string through example index
This is so that visiting

    /examples/index.html?mode=RAW&Debug=true

will automatically add ?mode=RAW&Debug=true to all links in the
generated index.
2012-10-17 11:31:40 +02:00
Éric Lemoine
4b6ef3c046 Better comments in loader.js 2012-10-16 21:56:35 +02:00
Éric Lemoine
190e21f796 The loader adds link tag for ol.css 2012-10-16 21:55:12 +02:00
Tom Payne
f7adc1ae75 Use identical code in compiled and standalone examples 2012-10-15 19:12:55 +02:00
Tom Payne
98340c55ce Don't use goog.* functions in examples 2012-10-15 19:11:02 +02:00