Allow user to override draw function in GridImageryProvider
See original GitHub issueThis came up in https://github.com/AnalyticalGraphicsInc/cesium/pull/8280. The idea is to make it easy for the developer to create effects like this hexagonal grid by allowing them to override the draw function in the GridImageryProvider
:
Cesium.Viewer('container', {
imageryProvider: Cesium.GridImageryProvider({
cells: 3,
drawGrid: function(context) {
// `context` is the canvas 2d context,
// you can use it to draw what you want.
}
})
});
Is this something you would use in your application? If so, please 👍 or describe your use case in this issue. Right now this is still possible to do by creating a custom imagery provider based off of the GridImageryProvider
in your application.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:6
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Allow user to override draw function in GridImageryProvider
The grid I'm drawing now is DQG( degenerate quadtree grid) based on primitives: Now I can't draw it on tiles, because if you...
Read more >UIView with draw function override… | Apple Developer Forums
My UIView is always drawn in the same place regardless of where I have placed it in Interface Builder, if I have the...
Read more >GridImageryProvider - Cesium Documentation
An ImageryProvider that draws a wireframe grid on every tile with controllable background and glow. May be useful for custom rendering effects or...
Read more >Overriding draw function in UIView class of iOS - Stack Overflow
When I am creating object of this class, I observed that I don't need to call "draw" function separately and it still draws...
Read more >Rectangle following an object - Google Groups
When you use "viewer.clock.startTime", I believe it's going to be trying to look up the position of the object at the time you...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I`m also trying to build a MGRS grid, kinda like a lat/long grid, but a bit more complex. So I need to take into consideration zoom, camera position and so on, and an imageryprovider this flexible would be great to work with.
The grid I’m drawing now is DQG( degenerate quadtree grid) based on primitives:
Now I can’t draw it on tiles, because if you project it in two dimensions:
Since I can’t draw DQG based on quadtree tiles, I draw them with primitives: Cesium.RectangleOutline and Cesium.Rectangle. Drawing grids with primitives have some problems such as linewidth is 1 and have to compute a lot every frame. So I want to draw it based on tiles. But I don’t know how to tile map following DQG scheme. I will be more than happy to share my ideas and code if I solve this problem. (Excuse my poooooor English) Sent from Mail for Windows 10 From: Omar Shehata Sent: 2019年10月24日 21:11 To: AnalyticalGraphicsInc/cesium Cc: AOldDriverA; Mention Subject: Re: [AnalyticalGraphicsInc/cesium] Allow user to override drawfunction in GridImageryProvider (#8282)
@AOldDriverA can you share a bit about your application and what you’re visualizing with a custom grid? — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.