Comments (4)
There are two kinds of heights. One which is over ellipsoid and one which over geoid. In this case you are using map where are coordinates provided in navigational spacial system which has heights over ellipsoid. You can take advantage that current map has public spacial system with heights over geoid and convert height by following function:
var newCoords = map.convertCoordsFromPublicToNav([14.3836691, 50.0485568, 333]);
I have modified your example which now gives more accurate results. Final result is also depended on the precision of the point coordinates and on the precision of the terrain geometry:
https://jsfiddle.net/mj26qkrw/
More about spatial coordinate systems in VTS can be found there:
http://vtsdocs.melown.com/en/latest/reference/concepts.html
from vts-browser-js.
Thank you very much David!
Indeed this method solves the problem of the height mismatch.
However if you run this method again with the same arguments then the result of the conversion is different for the height!?
We have created this demo:
https://jsfiddle.net/alamR/9xr5tx63/22/
You could check the console and notice the different values of height every time you click the custom button 'Clickme'.
from vts-browser-js.
Sorry, I forgot that function for conversion has second parameter which defines whether height is 'fix' or 'float'. Default mode is 'float' and height is computed from currently available data. Usually available data are not best match so more detailed data are loaded on the background. That is reason different values. Fixed function call:
var newCoords = map.convertCoordsFromPublicToNav([14.3836691, 50.0485568, 333], 'fix');
Fixed demos:
https://jsfiddle.net/5n97gm3y/
https://jsfiddle.net/mj26qkrw/12/
from vts-browser-js.
Thank you so much David!!
Now it is working as expected 👍 👍
from vts-browser-js.
Related Issues (20)
- Two instances of vts browser in a single html page.
- Add cloud layers to the map HOT 1
- z-buffer styling of geodata removes culling HOT 2
- Screenshot HOT 2
- drawlinestring not rendering on mobile HOT 2
- using custom tin mesh and rastor tiles HOT 4
- using custom tiles and tin mesh
- Hover events HOT 2
- Bound layer max LOD HOT 1
- Styling geodata dynamically and media queries HOT 5
- Find correct north vector at a given navigation Cords (geolocation)
- 'roll' componenet of position does not have effect HOT 2
- Control over pitch change as you zoom into object? HOT 2
- vts community hub?
- Render OBJ with no map HOT 1
- Render OBJ - MTL and JPG
- Modifying Freelayer position HOT 4
- loader for threejs? HOT 1
- mapConfig.json not working 404 ? HOT 3
- Getting "500 Internal Server Error" while accessing Melown Maps... HOT 18
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vts-browser-js.