ghettovoice / ol-rotate-feature Goto Github PK
View Code? Open in Web Editor NEWRotate feature interaction for OpenLayers
Home Page: https://ghettovoice.github.io/ol-rotate-feature/
License: MIT License
Rotate feature interaction for OpenLayers
Home Page: https://ghettovoice.github.io/ol-rotate-feature/
License: MIT License
Hello,
please make changes to support openlayers 8.
I created a pull request (#24) that should do the trick.
Thanks, Vojtech Osvald
I've noticed that the interaction does not re-calculate the anchor property on a feature if it is already present when creating the new interaction. This was a problem because I am working on an app that involves manipulating a feature with different interactions, and the anchor wouldn't update if a feature had been moved. This led me to have to write feature.U.anchor = []
after the other events were finished to correctly update the anchor. If you like, I can create a PR to fix this once I look through this code!
Rename repo and package name to "ol-tilecache" to avoid confusion with a supported version of OpenLayers
Hello, i have this method of adding the rotate interaction, but removing it is not possible. How is the way to achieve this?
rotateStatus = false;
onRotateMode() {
this.rotateStatus = !this.rotateStatus;
let rotate;
if (this.selectedFeatures) {
rotate = new RotateFeatureInteraction({
features: this.selectedFeatures
});
}
if (this.rotateStatus) {
this.map.addInteraction(rotate);
} else {
rotate = new RotateFeatureInteraction({
features: null
});
this.map.removeInteraction(rotate);
}
}
We have been using this with OL 7.4.0 and it seems to work fine
However yarn install
complains:
warning " > [email protected]" has incorrect peer dependency "ol@^6.0.0".
Could the peer dependencies be updated?
When using the last update (5.3) of OpenLayers with Angular 7.0.3 this warning is shown when serving the app:
WARNING in ./node_modules/ol-rotate-feature/dist/bundle.es.js 760:9-20
"export 'handleEvent' was not found in 'ol/interaction/Pointer'
i 「wdm」: Compiled with warnings.
That causes this error when trying to rotate a feature in the application:
ERROR TypeError: Cannot read property 'call' of undefined
at RotateFeatureInteraction.handleEvent$1 [as handleEvent]
...
I'm looking at the demo and am curious if you're able to disallow movement of the anchor. Ie. I want the anchor to begin at the 0,0 of the feature and not be movable.
Thanks.
P.S. this ol Interaction is fantastic. Thank you for authoring it!
getting this error when trying to upgrade to 3.1.0
npm ERR! code EINVALIDTAGNAME
npm ERR! Invalid tag name "^6.0.0|^7.0.0" of package "ol@^6.0.0|^7.0.0": Tags may not have any characters that encodeURIComponent encodes.
npm logs:
x@ 14 user staff 448 Jun 23 17:19 _npx
-rw-r--r--@ 1 user staff 0 Jul 25 15:42 _update-notifier-last-checked
199 │ 198 timing idealTree Completed in 62619ms
200 │ 199 timing command:i Completed in 62624ms
201 │ 200 verbose stack Error: Invalid tag name "^6.0.0|^7.0.0" of package "ol@^6.0.0|^7.0.0": Tags may not have any characters that encodeURIComponent e
│ ncodes.
202 │ 200 verbose stack at invalidTagName (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/npm-package-arg/lib/npa
│ .js:118:15)
203 │ 200 verbose stack at fromRegistry (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/npm-package-arg/lib/npa.j
│ s:426:13)
204 │ 200 verbose stack at Function.resolve (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/npm-package-arg/lib/n
│ pa.js:87:12)
205 │ 200 verbose stack at #nodeFromEdge (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arb
│ orist/build-ideal-tree.js:1058:37)
206 │ 200 verbose stack at async #loadPeerSet (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/@npmcli/arborist/li
│ b/arborist/build-ideal-tree.js:1321:23)
207 │ 200 verbose stack at async #buildDepStep (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/@npmcli/arborist/l
│ ib/arborist/build-ideal-tree.js:917:11)
208 │ 200 verbose stack at async Arborist.buildIdealTree (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/@npmcli/
│ arborist/lib/arborist/build-ideal-tree.js:196:7)
209 │ 200 verbose stack at async Promise.all (index 1)
210 │ 200 verbose stack at async Arborist.reify (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/node_modules/@npmcli/arborist/
│ lib/arborist/reify.js:159:5)
211 │ 200 verbose stack at async Install.exec (/Users/user/.nvm/versions/node/v18.17.0/lib/node_modules/npm/lib/commands/install.js:147:5)
212 │ 201 verbose cwd /Users/user/Documents/Projects/eTopocart/geo360-front
213 │ 202 verbose Darwin 22.6.0
214 │ 203 verbose node v18.17.0
215 │ 204 verbose npm v9.6.7
216 │ 205 error code EINVALIDTAGNAME
217 │ 206 error Invalid tag name "^6.0.0|^7.0.0" of package "ol@^6.0.0|^7.0.0": Tags may not have any characters that encodeURIComponent encodes.
218 │ 207 verbose exit 1
219 │ 208 timing npm Completed in 62754ms
220 │ 209 verbose unfinished npm timer reify 1690310974766
221 │ 210 verbose unfinished npm timer reify:loadTrees 1690310974768
222 │ 211 verbose unfinished npm timer idealTree:buildDeps 1690310974778
223 │ 212 verbose unfinished npm timer idealTree:#root 1690310974778
224 │ 213 verbose code 1
225 │ 214 error A complete log of this run can be found in: /Users/user/.npm/_logs/2023-07-25T18_49_34_643Z-debug-0.log
Demo site does not work: https://ghettovoice.github.io/ol-rotate-feature/demo.html
It seems, that there is a problem with loading OL.js
and OL.css
, which relates to this issue.
Please update and reference to the new packages:
https://cdnjs.cloudflare.com/ajax/libs/openlayers/9.1.0/dist/ol.min.js
https://cdnjs.cloudflare.com/ajax/libs/openlayers/9.1.0/ol.css
I tried the plugin with OL4 - is Open Layers 4 supported or did I miss something?
Hi,
happy new year and thank you providing us this ol-interaction :)
Could y give us an example how we can overrule css styles to hide the anchor icon for example or setting font color to the caption showing current angle on map?
Thx and best regards,
Nic
With the arrival of the new version (5.0.0), i want to know if its going to be updated or if works normally? Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.