stamen / mapstitch

Stitches map tiles together
MIT License
14 stars 1 forks source link

antimeridian calculation only called for "/mapimg" function? #7

Closed georgecoltart closed 10 years ago

georgecoltart commented 10 years ago

Hey there, I'm curious to know whether the getView function that calculates multiple extents is supposed to occur in both of the url endpoints?

At the moment it looks like it's only being called in the "/mapimg" function.

This means the getTilesForView function (line 126 of lib/index), which expects an 'extents' option not a single 'extent' option is failing for me.

Can you clarify that the '/' endpoint is supposed to use the same antimeridian calculation?

thanks again for your dev work on this :)

georgecoltart commented 10 years ago

Im also getting an error when attempting to start up the server with the most recent version?

/Users/georgecoltart/Sites/mapstitch-master/lib/index.js:40 validate = options.validate.bind(stitch) || stitch.validate; ^ TypeError: Cannot call method 'bind' of undefined at module.exports.exports (/Users/georgecoltart/Sites/mapstitch-master/lib/index.js:40:31) at Object. (/Users/georgecoltart/Sites/mapstitch-master/index.js:11:36) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:901:3

mojodna commented 10 years ago

We don't actually use the web service version of this, so I'm not sure. I'm looking into it now.

(We also always provide a custom validate function, which is how the 2nd bug snuck in--fortunately, that was an easy fix.)

mojodna commented 10 years ago

Antimeridian calculation isn't done for / since the extent is passed in via the query string. The simplest fix would be to check for "flipped" x coordinates and split the extent in 2, but that doesn't currently happen.

getTilesForView() should work on / now after 299c45b. Let me know how it goes.

georgecoltart commented 10 years ago

thanks a lot for getting back to me, this seems to be working better. Doing the antimeridian calc isnt crucial for me at the moment anyway, I might work it out later if I need it. cheers!