Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Use when the version you are using of the OpenLayers JavaScript client toolkit is 3 or later
2
votes
openlayers3 KeyboardPan not working
Make your map HTMLElement (div) focusable:
<div id="map" tabindex="0"></div>
1
vote
Making get feature request to forget between clicks in OpenLayers 3
Just try changing to:
map.on('singleclick', projectName);
Reference
1
vote
Deactivating Openlayers Cluster after a certain zoom level openlayers3
You can also listen to:
map.getView().on('change:resolution', function(evt){
//according to http://openlayers.org/en/v3.5.0/apidoc/ol.View.html
// I think this is not true for any scenario
…
7
votes
Accepted
OpenLayers 3, hover (select interaction with pointMove condition) on overlapping features
I don't know if you're yet interested but I came up with this plunker. I've learnt a lot doing this.
It looks like yours but I didn't remove ol.interaction.Select.
1
vote
Undoing last point when drawing linestring in OpenLayers 3?
I've made some tests and this can be done with something like this:
Set a custom listener to your draw interaction.
draw.set('escKey', '');
Set a global variable if drawing start, and store the cr …
1
vote
Accepted
Default Property/Attribute Template For Features On Specific Layers
You got it. The library itself cannot do it for you. Listen to:
layer.getSource().on('addfeature', function(evt){
//add your attributes
var feature = evt.feature;
});
1
vote
Accepted
How to clone an ol3 style?
Adapted from ol-debug.js:
var typeOf = function(obj){
return ({}).toString.call(obj)
.match(/\s([a-zA-Z]+)/)[1].toLowerCase();
};
function cloneObject(obj){
var type = typeOf(obj);
…
8
votes
Accepted
OpenLayers 3: How to check if vector source is ready?
You can provide your own loader function and set some custom listeners, as it follows:
var source = new ol.source.Vector({
loader: function(){
var url = '....../data/json/world-110m.json' …
2
votes
Select multiple features in OpenLayers 3
You may want this:
var selectClick = new ol.interaction.Select({
condition: ol.events.condition.click,
toggleCondition: ol.events.condition.shiftKeyOnly,
});
map.addInteraction(selectClick) …
8
votes
Accepted
Creating new buttons and removing default ones - Openlayers-3
}));
CSS, this is up to you:
.custom-zoom{
bottom: .5em;
left: .5em;
}
.custom-zoom button{
background-color: rgba(40, 40, 40, .7);
border-radius: 50%;
}
To create new controls:
Openlayers …
2
votes
Accepted
cannot add second interaction, openlayers 3
ol.interaction.KeyboardZoom() is enabled by default as docs state:
Allows the user to zoom the map using keyboard + and -. Note that, although this interaction is by default included in maps, the …
0
votes
Accepted
Openlayers 3: Hover effect below top layer with labels?
If you use select interaction, an overlay is created with the hover effect, that's why the label's tile are covered.
So, set style on feature on pointermove. A working fiddle.
1
vote
Accepted
Remove or delete selected feature in openlayers
UPDATED to achieve when layer is within a ol.layer.Group.
Now you should pass map reference to method.
http://jsfiddle.net/jonataswalker/r242y7ke/
A method to get ol.layer.Vector from feature you ca …
1
vote
One source to create multiple layers?
UPDATE: Trying to formulate an answer:
Load you json file with some AJAX function (a custom one here), and add to a new ol.layer.Vector depending on some parameter, called here category:
function ge …
1
vote
Accepted
Feature-source gets overwritten? - Openlayers-3
Make a clone instead of an assignment (var sourceChange = source;):
var sourceChange = clone(source);
function clone(obj) {
var copy;
// Handle the 3 simple types, and null or undefined
…