Commit Graph
100 Commits
Author SHA1 Message Date
Tim Schaub fd0a5f3622 Point, linestring, and linearring coordinates as Float32Array 2013-01-18 15:57:48 -07:00
Tim Schaub 278d32061f To be reworked for rendering like geoms with same symbolizer 2013-01-18 15:55:24 -07:00
Tim Schaub 3ac437393a To be reworked as ol.renderer.canvas.VectorLayer 2013-01-18 15:54:48 -07:00
Tim Schaub 74281d2b00 Merge from master 2013-01-17 18:12:06 -07:00
Tim Schaub fe56b15c52 Clear canvas with opacity 1 2013-01-17 15:30:16 -07:00
Tim Schaub d6de79b2bd Merge pull request #129 from tschaub/color
Going with CSS norms for r/g/b/a values.
2013-01-17 13:28:51 -08:00
Tim Schaub f39b6a1be3 Errant require 2013-01-17 14:23:35 -07:00
Tim Schaub 10672ad303 Standardizing color ranges (see #129) 2013-01-17 14:19:50 -07:00
Tim Schaub b36eab1dfa Properly set transform before filling background (closes #128)
Order of args is m11, m12, m21, m22, dx, dy
2013-01-17 13:40:00 -07:00
Tim Schaub 141e5aa9fc Trim search string before use
The `window.location.search` string includes the "?" symbol.  Without this change, `createFromQueryData` only works if the "renderer" parameter is not in first position (see 4037bafc45).
2013-01-17 13:05:47 -07:00
Tim Schaub 7971ec1b3b Render geometries to a canvas 2013-01-07 01:42:31 -05:00
Tim Schaub 7cca691b9f Start of style package
These literals will be used internally only - created when evaluating
non-literal symbolizers (with properties that are expressions).
2013-01-07 01:41:02 -05:00
Tim Schaub 997c7145ab Bare bones geom package 2013-01-07 01:34:33 -05:00
Tim Schaub 464be78a16 Satisfying compiler 2013-01-06 10:59:21 -07:00
Tim Schaub 39af56ecb3 Satisfying gjslint 2013-01-06 10:07:29 -07:00
Tim Schaub 6f929efeb3 Merge branch 'master' into vector 2013-01-06 09:37:34 -07: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:
https://github.com/WebKit/webkit/blob/8f4765e5698c9171c2b3f984d0d9d65188185de3/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
Tim Schaub e57f8b45a6 Merge pull request #78 from geops/api-docs-jsdoc
Taking over new template from jsdoc but keep modifications by OpenLayers as much as possible
2012-10-31 13:38:24 -07:00
tschaub 3af801df96 Updating instructions on contributions
This links to the newly created online ICLA form.
2012-10-26 15:41:13 -06:00
Tim Schaub eef4eb0eea Merge pull request #61 from twpayne/z-sort-in-dom-renderer
Z sort in dom renderer
2012-10-17 21:24:40 -07:00
Tim Schaub f8462460bf Two lessons learned
Telling the compiler that object keys are numeric causes more harm
than good (see === comparison that could never be met though the
compiler didn't catch it).

Never use goog functions without reading the source first.  The
goog.array.sort method does nothing special sorting numeric strings
(so the zs array might be ['1', '10', '2'] here).
2012-10-09 23:31:38 -06:00
Tim Schaub ce1b99cb56 Remove alt-z tiles when all tiles load at target z
The changes in a14a15159f made it so tiles
at alternate resolutions were not pruned when target tiles finished loading.
2012-10-09 22:56:37 -06:00
Tim Schaub a14a15159f Simpler and more thorough tile pruning
The render method always generates a map of all tiles that should be drawn
(called tilesToDrawByZ).  This includes tiles at alternate resolutions, tiles
still loading, and tiles previously rendered.  At the end of the render
sequence we can simply remove all previously rendered tiles that aren't in
tilesToDrawByZ.  This provides an alternate solution to the problem described
in #53 and more.
2012-10-08 00:41:21 -06:00
Tim Schaub 2c2d40a53c Remove tiles outside rendered extent
To avoid having misplaced at alternate resolutions while zooming, all tiles
outside the rendered extent need to be removed from the dom (closes #53).
2012-10-07 23:47:47 -06:00
Tim Schaub d6173a5aac Removing unused code 2012-10-07 22:57:09 -06:00
tschaub 671c902d72 Creating the target directory for api docs 2012-10-01 16:35:38 -06:00
Tim Schaub c120c03fb1 Properly maintain offset and origin while rotating
This brings equivalent behavior when rotating in both renderers.  Previously, offsets were maintained with style top/left.  Now a single transform handles the translation and rotation.  The scale3d function removes the separation between tiles.  The next step for the DOM renderer is to scale in this same transform.
2012-09-29 17:55:28 -06:00
Tim Schaub 0e27f31785 Avoid undefined rotation 2012-09-29 17:47:44 -06:00
Tim Schaub 67bc677ecb Stick with radians 2012-09-29 01:37:54 +02:00
Tim Schaub 50bf2f015c Getting rid of lines between rotated tiles
Applying the scale3d trick just to get rid of small pixel gap between rotated tiles.  This will be reworked soon with additional use of transforms.
2012-09-29 01:33:50 +02:00
Tim Schaub bc5cd13855 Tiny bit of style 2012-09-29 01:17:46 +02:00
Tim Schaub c24e520961 Non-functioning example
When loading this example in compiled mode, the page displays the following:

    ol3 proj4js demo

    [object Object][object Object]

With `mode=RAW`, it does display some numbers, but I think we could better explain this functionality with a different sort of tutorial/example.
2012-09-29 01:12:40 +02:00
Tim Schaub 71547c6e48 Examples don't load without make serve 2012-09-29 00:47:42 +02:00
Tim Schaub ff19ab0a28 Call event.getPixel() to get the map pixel offset
The new getPixel method should be used instead of checking offsetX/Y on the browser event.
2012-09-28 12:19:32 +02:00
Tim Schaub eb29e6a43c Using null instead of null or object or undefined 2012-09-28 12:08:21 +02:00
Tim Schaub 3e34013c09 Separating out method to get pixel offset 2012-09-28 12:08:21 +02:00
Tim Schaub 6ed27779cc Rotation support for the dom renderer
Thanks @fredj for the inspiration.  This gives us initial rotation support.  It exposes some issues in the interactions that I'll address separately.  Closes #22.
2012-09-28 10:53:36 +02:00
Tim Schaub 981a40a994 Remove tiles that are still loading at alt z
When zooming to a new zoom level, we can immediately remove tiles from the previous level.  This (strongly) suggests not adding images to the container until they have actually loaded.
2012-09-27 17:46:23 +02:00
Tim Schaub b8a69f0777 Adjusting layers pane only when necessary
We only want to adjust things that have to do with rendering (like the position of the layers panel) when actually rendering.  The handleXChange methods may be called more times than we can actually render, so we never want to do anything that touches the DOM there.  Instead, we have to keep track of the state at previous render and adjust the layers panel (or other) based on changes only when rendering.
2012-09-27 16:09:04 +02:00
Tim Schaub d4d04eface Less whitespace by default. 2012-09-27 16:09:03 +02:00
Tim Schaub 9f9729656b Todos done. 2012-09-27 16:09:03 +02:00
Tim Schaub 3510c37e43 Handle map size changes in the renderer 2012-09-26 14:10:16 +02:00
Tim Schaub 5b36cf1312 Only adjust tile when necessary 2012-09-26 13:12:36 +02:00
Tim Schaub 24edce24f1 Add alternate tiles under tiles at target z
When zooming or panning, if we have tiles at alternate resolutions, those tiles are inserted in the DOM before the tiles at the target resolution.  This means you should see blurry tiles instead of whitespace when panning (assuming you've already zoomed in a bit).
2012-09-26 12:18:11 +02:00
Tim Schaub 48c4cbc1e5 Correcting comment typos 2012-09-26 11:11:51 +02:00
Tim Schaub 8e38ab0fdc Lint free. 2012-09-26 10:58:17 +02:00
Tim Schaub 3479e20b0a Merge branch 'alt-tiles' 2012-09-26 10:55:25 +02:00
Tim Schaub 7f58d1a8c6 Proper handling of out-of-range and alt-z tiles
Tile pruning code separated into to methods for clarity.  Alt-z tiles are only removed when all current-z tiles have loaded.  Thanks @elemoine for the excellent debugging session.
2012-09-26 10:52:17 +02:00
Tim Schaub 299173194c First pass at alt-tile rendering for dom renderer 2012-09-25 20:06:20 +02:00
Tim Schaub 900eead7c6 Correct type for imagesToLoad. Add note about shorter path. 2012-09-25 12:08:02 +02:00
Tim Schaub 5eb5715530 More longname display. 2012-09-24 18:23:19 +02:00
Tim Schaub 2b307ef6a9 Replace opt_ prefix with (Optional) in description. 2012-09-24 18:23:19 +02:00
Tim Schaub b73ffbdc7c Hide source tags (until we get the full path). 2012-09-24 18:23:19 +02:00
Tim Schaub f2c05bdf0f Remove "arguments" column from params table. 2012-09-24 18:23:19 +02:00
Tim Schaub 99e58cb8e0 Stylesheet to hide protected members.
Source tags are also hidden here as they only provide the file name and not the complete path.  This should be fixed in JSDoc 3.
2012-09-24 18:23:19 +02:00
Tim Schaub 2add7288e5 Doc target for building with JSDoc 3.
This assumes jsdoc is on the path.
2012-09-24 17:25:33 +02:00
Tim Schaub d51cd1c395 Interaction in ol.interaction namespace. 2012-09-24 17:18:21 +02:00
Tim Schaub ed754fbfdf Control in the ol.control namespace. 2012-09-24 17:15:30 +02:00
Tim Schaub 1f9e2aa3c4 Move Layer into ol.layer namespace. 2012-09-24 17:08:36 +02:00
Tim Schaub 57d75ace5d Adding a JSDoc 3 template. 2012-09-24 16:59:27 +02:00
Tim Schaub c3a41c967e Removing file overviews for now. 2012-09-24 16:58:55 +02:00
Tim Schaub c56fce2be8 Attempting to clarify. 2012-07-11 17:20:06 +02:00
Tim Schaub 1dd2512765 Specs for getting tile coords. 2012-07-09 01:15:56 -06:00
Tim Schaub 7f594364ca Pixels aligned top,left to origin. 2012-07-09 01:15:56 -06:00
Tim Schaub 5a485ea856 Getting explicit about pixels and size.
Eventually, well have to ask renderers for all pixel and size related stuff.  And the map overlay renderer will do all pixel<->loc math.  For now, we let the map do this math based on its viewport - as this is where the mouse events are handled and it is pixels relative to the viewport that are being generated.  For now, the getViewportPixelForLoc and getLocForViewportPixel are now more explicitly named.
2012-07-08 20:57:36 -06:00
Tim Schaub 3d130d3325 Letting the map ask renderer for resolution. 2012-07-08 20:56:36 -06:00
Tim Schaub 4dfb5d0dee Set center on reset. Only shift if offset. 2012-07-08 20:42:15 -06:00
Tim Schaub b24d63a898 Spaces for tabs. 2012-07-08 19:34:53 -06:00
Tim Schaub 4911320eef Rework DOM composite renderer. 2012-07-08 18:37:23 -06:00
Tim Schaub ceaba3cdd4 Overlays above the renderer. 2012-07-08 18:37:23 -06:00
Tim Schaub bb7127c548 Merge branch 'renderer' 2012-07-07 17:17:59 -06:00
Tim Schaub ddd57426b5 Allow renderer to have a buffer. 2012-07-07 16:50:22 -06:00
Tim Schaub dc409ebcc4 Resize images in case they were previously scaled. 2012-07-07 15:42:08 -06:00
Tim Schaub c0777cc003 Working with integer pixel space. 2012-07-07 15:19:49 -06:00
Tim Schaub 523f4d61fc Shift container for all layer renderers together. 2012-07-07 13:13:07 -06:00
tschaub d435f6b4fd Simplifying the loader.
Plovr checks the referrer for query string parameters (like mode), so we don't need any of this query string parsing (thanks @elemoine for the tip).

The reason we still dynamically generate the script tag is to work on other domains (e.g. testing on a VM or mobile device).  In this case, we make use of the `window.location.hostname`.
2012-07-05 13:55:24 -06:00
Tim Schaub 0650d93d17 Let the composite renderer manage containers. 2012-07-04 22:17:56 -06:00
Tim Schaub d8e8e55b44 Generalizing query string parsing in the loader. 2012-07-04 20:53:03 -06:00
Tim Schaub 08d6e35252 Accept an id param for the loader. 2012-06-23 20:00:28 +02:00
Tim Schaub 2fcbce30bc For now, we require a projection on loc internally. 2012-06-23 19:59:49 +02:00
Tim Schaub bcc85b9dd7 Must set a projection before setting center. 2012-06-23 16:55:16 +02:00
Tim Schaub db2cbe07b7 Transforming coords before setting center.
The internal setCenter method can only be called with locations that have projections.  This method always transforms.
2012-06-23 16:42:51 +02:00
Tim Schaub 48704cce2f Make sure to set a projection on user center.
Only in the API do we allow setting the map center without a projection.  This is all handled in the center getter/setter.
2012-06-23 15:40:43 +02:00
Tim Schaub 167f77dd7e Updating example with build config. 2012-06-23 15:22:37 +02:00
Tim Schaub df1dfd5295 Adding exports to get advanced compilation. 2012-06-23 15:22:37 +02:00
Tim Schaub 795f8b854d Adding instructions for build utilities. 2012-06-23 14:10:25 +02:00
Tim Schaub a1fcb4e065 Build with an arbitrary configuration. 2012-06-23 13:55:06 +02:00
Tim Schaub 2991041b3c Cleaning up a bit. 2012-06-23 13:23:10 +02:00
Tim Schaub c4f91d498c Prep for more efficient moves. 2012-06-23 12:42:09 +02:00
Tim Schaub 76d90428bd Pleasant zoom. 2012-06-23 03:32:27 +02:00
Tim Schaub 0554bceb29 Drag and zoom without throwing.
(This is a bit tedious, suggests a pending state.)
2012-06-23 02:17:14 +02:00
Tim Schaub 789eaa2742 Loaded typo. 2012-06-23 02:11:26 +02:00
Tim Schaub ef0fd8da60 Pixels increase right and down. 2012-06-23 02:00:28 +02:00
Tim Schaub b6cfeecdfb Adjust tiles if already rendered. 2012-06-23 01:59:20 +02:00
Tim Schaub 5fa42e9b30 A map that zooms. 2012-06-22 20:46:34 +02:00
Tim Schaub cfe3f14777 Stray console log. 2012-06-22 20:38:24 +02:00
Tim Schaub 787f2ba979 Common method for conditionally rendering. 2012-06-22 20:37:29 +02:00
Tim Schaub b986395358 This is not doing what you think it is. 2012-06-22 20:25:26 +02:00
Tim Schaub f46a7dbc2a Updated example. 2012-06-22 20:10:02 +02:00