Skip to content
This repository was archived by the owner on Mar 6, 2019. It is now read-only.

[webgl-point] Add hit-detection support for WebGL #49

Open
wants to merge 65 commits into
base: webgl-point
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
a715a38
Simplify CSS code in custom-controls example
fredj Oct 30, 2014
6dc90ae
Update attribution CSS #2803
Dec 12, 2014
b60b0ec
Add support for wrapping the build in UMD syntax.
tschaub Dec 13, 2014
fa68410
Merge remote-tracking branch 'upstream/master'
Dec 18, 2014
2f59995
Removed unnecessary max-width from CSS .ol-attribution ul
Dec 18, 2014
3bc84c7
Merge pull request #3038 from acanimal/master
bartvde Dec 19, 2014
3d86339
Merge pull request #3039 from tschaub/umd
tschaub Dec 19, 2014
b7e0acf
Update pre-release version
tschaub Dec 19, 2014
95972b3
Merge pull request #3068 from tschaub/pre-3
tschaub Dec 19, 2014
a95327f
Define goog and assign to global
tschaub Dec 19, 2014
27b5036
Merge pull request #3070 from tschaub/umd-debug
tschaub Dec 19, 2014
3582445
Add task for publishing to npm
tschaub Dec 20, 2014
d4763a0
Set CLOSURE_NO_DEPS globally
tschaub Dec 20, 2014
9b0349f
Variable for builds directory
tschaub Dec 20, 2014
0ae00fb
Merge pull request #3071 from tschaub/publish
tschaub Dec 20, 2014
38b12d3
Make map's deviceOptions map options
ahocevar Dec 21, 2014
eabb795
Remove misplaced function annotation
fredj Dec 22, 2014
ab76c2c
Remove unneeded undefined from ol.proj.ProjectionLike definitions
Dec 22, 2014
62854f6
Add script to standardize changelog ceation
tschaub Dec 22, 2014
aee37c4
Merge pull request #3075 from bartvde/remove-projlike-undefined
bartvde Dec 22, 2014
ffea25f
Merge pull request #3074 from fredj/misplaced-function-annotation
tschaub Dec 22, 2014
d8a845d
Merge pull request #3076 from tschaub/changelog
tschaub Dec 22, 2014
9b55d20
Changelog for v3.1.0
tschaub Dec 22, 2014
dc7f608
Update package version to 3.1.0
tschaub Dec 22, 2014
a796542
Summarize changes and add upgrade notes
tschaub Dec 22, 2014
78ac65e
Merge pull request #3077 from tschaub/release-v3.1.0
tschaub Dec 22, 2014
4b423fc
Exclude source files from docs
tschaub Dec 22, 2014
97afb31
Merge pull request #3073 from ahocevar/load-tile-options
ahocevar Dec 23, 2014
e62c333
Correct arguments for forEachGeometryAtPixel
tschaub Dec 23, 2014
8f8b7e1
Merge pull request #3082 from tschaub/issue-3081
tschaub Dec 23, 2014
676476e
Changelog for v3.1.1
tschaub Dec 23, 2014
7dd322d
Update package version to 3.1.1
tschaub Dec 23, 2014
68438c7
Merge pull request #3083 from tschaub/release-v3.1.1
tschaub Dec 23, 2014
cc4a690
Fixed documentation typo for return value of ol.proj.Projection.isGlo…
mike-mcgann Dec 23, 2014
5d2f463
Merge pull request #3085 from mike-mcgann/doc-typo
tschaub Dec 23, 2014
9a4c56d
Merge pull request #2894 from fredj/simplify-custom-controls
fredj Dec 27, 2014
6b162f8
Fixed URL link for test README
mike-mcgann Dec 29, 2014
8eb6814
Merge pull request #3089 from mike-mcgann/fix_test_readme_url
bartvde Dec 29, 2014
38b890a
Removing AUTHORS.md
tschaub Jan 4, 2015
8e982b0
Merge pull request #3094 from tschaub/authorless
tschaub Jan 4, 2015
06fe828
Merge pull request #3084 from openlayers/v3.1.x
tschaub Jan 5, 2015
d4ff552
Set the position to undefined to hide the overlay
fredj Jan 5, 2015
a753135
Remove moz-box-shadow CSS rule
fredj Jan 5, 2015
df51e55
Assert that ol.layer.Tile#getPreload is always set
fredj Jan 7, 2015
55dda99
Assert that ol.layer.Tile#getUseInterimTilesOnError is always set
fredj Jan 7, 2015
d35ea9e
Merge pull request #3100 from fredj/tilelayer-attr
fredj Jan 7, 2015
0a784bf
Allow bracket notation
tschaub Jan 8, 2015
f9a92c4
Use bracket notation instead of goog.object.set
tschaub Jan 8, 2015
a09a76c
Merge pull request #3079 from tschaub/sourceless-docs
tschaub Jan 8, 2015
1ff4368
Use bracket notation instead of goog.object.get
tschaub Jan 8, 2015
3be6a84
Merge pull request #3101 from tschaub/object
tschaub Jan 8, 2015
1ee0362
Optimize hit detection by rendering features in a limited extent
tschaub Dec 20, 2014
b952f11
Merge pull request #3072 from tschaub/hit-extent
tschaub Jan 8, 2015
904fac0
Merge pull request #3096 from fredj/example-cleanup
fredj Jan 8, 2015
91d2b3b
Don't pass renderBuffer option to the parent constructor
fredj Jan 8, 2015
1f90aad
Merge pull request #3104 from fredj/vector-constr
fredj Jan 8, 2015
7404204
Add hit-detection framebuffer to context
Dec 18, 2014
3ef61fa
Add hit-detection support for webgl
Dec 18, 2014
cf6dd38
Use hit-detection images
Dec 18, 2014
461ec1d
Make sure hit-detection atlas is in sync
Dec 18, 2014
da7f386
Remove hitDetectionOrigin
Dec 18, 2014
6c48b20
Make icon example work with webgl
Dec 18, 2014
060c9f3
Reduce number of arrays created
Dec 19, 2014
38322d6
Use renderBuffer for hit-detection
Dec 19, 2014
974823d
Refactor createTexture
Jan 8, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*.pyc
/build
/build/
/examples/*.html.png
/examples/example-list.js
/examples/example-list.xml
/node_modules/
/dist/
5 changes: 3 additions & 2 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"-W030": true,
"-W083": true
"-W030": true,
"-W083": true,
"-W069": true
}
5 changes: 5 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.pyc
/build/
/examples/*.html.png
/examples/example-list.js
/examples/example-list.xml
58 changes: 0 additions & 58 deletions AUTHORS.md

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ To run the tests on the console (headless testing with PhantomJS) use the `test`

$ ./build.py test

See also the test-specific [README](../blob/master/test/README.md).
See also the test-specific [README](../master/test/README.md).

## Running the integration tests

Expand Down
3 changes: 1 addition & 2 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Copyright 2005-2014 OpenLayers Contributors. All rights reserved. See
AUTHORS.md for full list.
Copyright 2005-2014 OpenLayers Contributors. All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
Expand Down
234 changes: 234 additions & 0 deletions changelog/v3.1.0.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions changelog/v3.1.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 3.1.0

## Summary

This is a patch release to fix an issue with the select interaction in the 3.1.0 release.

## Changes

* [#3082](https://github.com/openlayers/ol3/pull/3082) - Correct arguments for forEachGeometryAtPixel. ([@tschaub](https://github.com/tschaub))
2 changes: 1 addition & 1 deletion config/jsdoc/api/conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"cleverLinks": true,
"monospaceLinks": true,
"default": {
"outputSourceFiles": true
"outputSourceFiles": false
},
"applicationName": "OpenLayers 3"
},
Expand Down
3 changes: 2 additions & 1 deletion config/ol-debug.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"exports": ["*"]
"exports": ["*"],
"umd": true
}
2 changes: 1 addition & 1 deletion config/ol.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"exports": ["*"],
"umd": true,
"compile": {
"externs": [
"externs/bingmaps.js",
Expand Down Expand Up @@ -59,7 +60,6 @@
],
"compilation_level": "ADVANCED",
"warning_level": "VERBOSE",
"output_wrapper": "(function(){%output%})();",
"use_types_for_optimization": true,
"manage_closure_dependencies": true
}
Expand Down
1 change: 0 additions & 1 deletion css/ol.css
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ button.ol-full-screen-true:after {
line-height: 1.375em;
color: #000;
text-shadow: 0 0 2px #fff;
max-width: calc(100% - 3.6em);
}
.ol-attribution li {
display: inline;
Expand Down
3 changes: 3 additions & 0 deletions examples/animation.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ var map = new ol.Map({
})
],
renderer: exampleNS.getRendererFromQueryString(),
// Improve user experience by loading tiles while animating. Will make
// animations stutter on mobile or slow devices.
loadTilesWhileAnimating: true,
target: 'map',
controls: ol.control.defaults({
attributionOptions: /** @type {olx.control.AttributionOptions} */ ({
Expand Down
3 changes: 3 additions & 0 deletions examples/bing-maps.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ for (i = 0, ii = styles.length; i < ii; ++i) {
var map = new ol.Map({
layers: layers,
renderer: exampleNS.getRendererFromQueryString(),
// Improve user experience by loading tiles while dragging/zooming. Will make
// zooming choppy on mobile or slow devices.
loadTilesWhileInteracting: true,
target: 'map',
view: new ol.View({
center: [-6655.5402445057125, 6709968.258934638],
Expand Down
29 changes: 1 addition & 28 deletions examples/custom-controls.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,39 +10,12 @@
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<style type="text/css">
.rotate-north {
position: absolute;
top: 65px;
left: 8px;
background: rgba(255,255,255,0.4);
border-radius: 4px;
padding: 2px;
left: .5em;
}
.ol-touch .rotate-north {
top: 80px;
}
.rotate-north a {
display: block;
color: white;
font-size: 16px;
font-family: 'Lucida Grande',Verdana,Geneva,Lucida,Arial,Helvetica,sans-serif;
font-weight: bold;
margin: 1px;
text-decoration: none;
text-align: center;
border-radius: 2px;
height: 22px;
width: 22px;
background: rgba(0,60,136,0.5);
}
.ol-touch .rotate-north a {
font-size: 20px;
height: 30px;
width: 30px;
line-height: 26px;
}
.rotate-north a:hover {
background: rgba(0,60,136,0.7);
}
</style>
<title>ol3 custom controls example</title>
</head>
Expand Down
15 changes: 6 additions & 9 deletions examples/custom-controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,23 +29,20 @@ app.RotateNorthControl = function(opt_options) {

var options = opt_options || {};

var anchor = document.createElement('a');
anchor.href = '#rotate-north';
anchor.innerHTML = 'N';
var button = document.createElement('button');
button.innerHTML = 'N';

var this_ = this;
var handleRotateNorth = function(e) {
// prevent #rotate-north anchor from getting appended to the url
e.preventDefault();
this_.getMap().getView().setRotation(0);
};

anchor.addEventListener('click', handleRotateNorth, false);
anchor.addEventListener('touchstart', handleRotateNorth, false);
button.addEventListener('click', handleRotateNorth, false);
button.addEventListener('touchstart', handleRotateNorth, false);

var element = document.createElement('div');
element.className = 'rotate-north ol-unselectable';
element.appendChild(anchor);
element.className = 'rotate-north ol-unselectable ol-control';
element.appendChild(button);

ol.control.Control.call(this, {
element: element,
Expand Down
7 changes: 3 additions & 4 deletions examples/icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ goog.require('ol.View');
goog.require('ol.geom.Point');
goog.require('ol.layer.Tile');
goog.require('ol.layer.Vector');
goog.require('ol.source.TileJSON');
goog.require('ol.source.OSM');
goog.require('ol.source.Vector');
goog.require('ol.style.Icon');
goog.require('ol.style.Style');
Expand Down Expand Up @@ -39,12 +39,11 @@ var vectorLayer = new ol.layer.Vector({
});

var rasterLayer = new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp'
})
source: new ol.source.OSM()
});

var map = new ol.Map({
renderer: exampleNS.getRendererFromQueryString(),
layers: [rasterLayer, vectorLayer],
target: document.getElementById('map'),
view: new ol.View({
Expand Down
2 changes: 0 additions & 2 deletions examples/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
<style type="text/css">
.ol-popup {
display: none;
position: absolute;
background-color: white;
-moz-box-shadow: 0 1px 4px rgba(0,0,0,0.2);
-webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
padding: 15px;
Expand Down
6 changes: 2 additions & 4 deletions examples/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var closer = document.getElementById('popup-closer');
* @return {boolean} Don't follow the href.
*/
closer.onclick = function() {
container.style.display = 'none';
overlay.setPosition(undefined);
closer.blur();
return false;
};
Expand Down Expand Up @@ -65,9 +65,7 @@ map.on('click', function(evt) {
var hdms = ol.coordinate.toStringHDMS(ol.proj.transform(
coordinate, 'EPSG:3857', 'EPSG:4326'));

overlay.setPosition(coordinate);
content.innerHTML = '<p>You clicked here:</p><code>' + hdms +
'</code>';
container.style.display = 'block';

overlay.setPosition(coordinate);
});
Loading