GithubHelp home page GithubHelp logo

brendankenny / canvaslayer Goto Github PK

View Code? Open in Web Editor NEW
147.0 147.0 52.0 236 KB

A <canvas> map layer for the Google Maps JavaScript API v3 for 2d and WebGL data visualization

License: Apache License 2.0

JavaScript 62.01% HTML 37.99%

canvaslayer's People

Contributors

brendankenny avatar jdduarte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

canvaslayer's Issues

npm module

Can this be an npm package? Would be nice to get it in my package.json with semantic versioning.

setMap: not an instance of Map

Hello! I'm trying to use this library but cannot even initialize it. It's dropping me InvalidValueError: setMap: not an instance of Map; and not an instance of StreetViewPanorama error.

var canvasLayerOptions = {
  map: this.map,
  animate: false
};

var canvasLayer = new CanvasLayer(canvasLayerOptions);

return canvasLayer.canvas.getContext('2d');

That's the code, that I'm using to initialize it. this.map is not undefined and instanceof google.maps.Map on it returns true

On IE8, the canvas doesn't move along with the map.

This is because moving the canvas is being done with the transform CSS property which IE8 doesn't support.

I have a simple PR which uses margin-left and margin-top instead, when the browser doesn't support transform.

I know IE8 is legacy but I had to do that change for my application. If you think it's useful to have it merged I can submit it. If not, I completely understand why and just feel free to close this issue.

Dragging Delay

I was trying to figure out why dragging the map took the canvas some time to follow it, producing a noticeable not-in-sync lag.

It puzzled me because I was not seeing that happening on your talks on youtube. I thought it was some sort of lack of hardware acceleration on my laptop.

I disabled the center_changed listener on the map, which was triggering this.repositionFunction_ and noticed it stopped happening on the sample hello2d, but caused some delays on displaying markers on hello_webgl. Browsed along and found your todo:

https://github.com/brendankenny/CanvasLayer/blob/gh-pages/src/CanvasLayer.js#L474-476

That's it right?

Reposition callback

In my app, it is desirable to get a 'reposition' callback. This then allows me to recompute the various matrixes and drawing buffers. Currently I have to do this calculation in the update callback. I guess that I could just look and see if the bounds have changed, and recompute then....

Vertical resize

hello_webgl canvas translates independent from map on a vertical window resize,
as canvasLayerOptions: resizeHandler does not seem to getting called on a window resize event.

workaround: NeuralSpaz@213045e for hello_webgl

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.