You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experimenting with some alternate projections. I'm scratching my head a little trying to figure out the best way to make this work with modest maps, since the spherical mercator projection is hardcoded into the Map constructor. @tmcw or @shawnbot, if you were to add support for arbitrary projections, where would you do it? Would you have the Map object pick up the projection from the first layer it sees? Should it be possible to simply re-assign map.projection after an instance is created? I'm thinking it shouldn't and that picking up a projection from the first defined layer is the right way to go, and reassigning .projection is getting me some weird behaviors.
If you're curious, here's some sample code that I already know works on the server side in TileStache and I've verified that all the math is correct: https://gist.github.com/2691614
The text was updated successfully, but these errors were encountered:
So my ability to really say anything in this area is limited by not coming in contact with any non-Mercator maps recently or having a way to prop them up (can I just set up a quick layer in TileStache with an alt projection?)
So my best guess is this:
Projections will need to be one-per-map, and layer types will have to declare compatibility.
Interesting, so it seems like projections should moved to the map from the layers, where they currently reside. This feels like a somewhat-overdue implication of the move to multiple layers, something that filled me with a degree of tension when I an early pass at layer support a while back.
I'm experimenting with some alternate projections. I'm scratching my head a little trying to figure out the best way to make this work with modest maps, since the spherical mercator projection is hardcoded into the Map constructor. @tmcw or @shawnbot, if you were to add support for arbitrary projections, where would you do it? Would you have the Map object pick up the projection from the first layer it sees? Should it be possible to simply re-assign map.projection after an instance is created? I'm thinking it shouldn't and that picking up a projection from the first defined layer is the right way to go, and reassigning .projection is getting me some weird behaviors.
If you're curious, here's some sample code that I already know works on the server side in TileStache and I've verified that all the math is correct: https://gist.github.com/2691614
The text was updated successfully, but these errors were encountered: