Simon Martín
80918f5b9b
adding rate limit middlewware to named maps controller
2018-02-20 11:26:24 +01:00
Daniel García Aubert
da32d96607
Fix regression: default to all layers if layer filter is not provided
2018-01-16 17:57:22 +01:00
Daniel García Aubert
76da828168
Use error label as middleware argument
2018-01-16 17:55:09 +01:00
Daniel García Aubert
ce4050e3e3
Extrac method to get only user params
2018-01-15 18:09:54 +01:00
Daniel García Aubert
b82767c60d
Pass a copy of res.locals w/o new data boud to named-map-provider-cache
2018-01-15 17:40:34 +01:00
Daniel García Aubert
183c8291bc
Use arrow functions when it applies
2018-01-09 11:20:20 +01:00
Daniel García Aubert
d908ffdbca
Don't use arrow functions when there is no needed
2018-01-09 11:17:07 +01:00
Daniel García Aubert
49c97e2cf2
Use default argument
2018-01-02 10:56:45 +01:00
Daniel García Aubert
41e65a9633
Remove max cyclomatic complexity
2018-01-01 18:06:56 +01:00
Daniel García Aubert
feae766e62
Create middleware to fetch named map template
2018-01-01 16:54:35 +01:00
Daniel García Aubert
e3bdeec8ca
Simplify middleware
2018-01-01 16:21:22 +01:00
Daniel García Aubert
80c4207c74
Remove underscore dependencie
2017-12-30 18:18:37 +01:00
Daniel García Aubert
80e4306fbc
Remove step and assert dependencies
2017-12-30 18:03:26 +01:00
Daniel García Aubert
543d257a20
Move sendResponse to a middleware
2017-12-30 17:18:12 +01:00
Daniel García Aubert
8a023e3d2f
Keep error label
2017-12-30 16:08:46 +01:00
Daniel García Aubert
f13b45862d
Move incrementMapViews to a middlewares
2017-12-30 16:04:24 +01:00
Daniel García Aubert
731fe4c00f
Move getStaticImageOptions and getImage to a middlewares
2017-12-30 15:21:20 +01:00
Daniel García Aubert
500cbb959f
Move method to a middleware
2017-12-30 14:13:23 +01:00
Daniel García Aubert
108a319143
Do not use step
2017-12-29 19:33:49 +01:00
Daniel García Aubert
ef5ea5b4cb
Create and use getNamedMapProvider middleware
2017-12-29 19:31:02 +01:00
Mario de Frutos
8d16bf566d
Force png tile generation for static maps ( #808 )
...
* Force png tile generation for static maps
If the user tries to generate a static map requesting JPG it will fail
because is going to try to generate the tiles using JPG as format which
is not supported by now, this bug was introduced in the version 4.0.1
So we now force, again, the tiles to be generated as PNG but we pass
the requested format, JPG, to windshaft to generate the final image as
the user reqests
* Added support to define image format in the image assertions
* Added test for JPEG static image generation
Also I've added support for:
- JPEG images
- Different tolerance based on the file type, it seems that due to
different compression we need different tolerance for JPG images
2017-12-12 13:20:22 +01:00
Simon Martín
22e3016cd3
Merge branch 'master' into timeoutVectorImage
2017-11-14 15:54:16 +01:00
Daniel García Aubert
38ca5db51b
Inline method to set cache-cannel, rollback extract setCacheChannel method for named maps controller
2017-11-13 12:35:46 +01:00
Simon Martín
970310bf7f
add vectorError middleware to named map endpoint
2017-11-07 16:01:08 +01:00
Daniel García Aubert
3f2ef63976
Extract cache channel to its own method
2017-10-31 11:38:54 +01:00
Daniel García Aubert
b6c405bf68
Remove send method in base controller and remove BaseController class
2017-10-30 19:28:40 +01:00
Simon Martín
21720267cf
from req.context to res.locals
2017-10-03 17:47:57 +02:00
Simon Martín
3ce10690d6
send res.locals instead of res when possible
2017-10-03 13:06:12 +02:00
Simon Martín
f9d87bc40f
res.locals fixing controllers
2017-10-02 12:07:35 +02:00
Simon Martín
783eb0eec7
res.locals format and layer in namep maps
2017-09-29 17:03:57 +02:00
Simon Martín
482feabce2
res.locals in named maps controller
2017-09-29 14:37:55 +02:00
Simon
540fda1e6c
Merge branch 'master' into middlewarify
2017-09-26 14:53:57 +02:00
Daniel García Aubert
4899c7ffef
Inject prepare context middleware to controllers
2017-09-25 19:40:27 +02:00
Daniel García Aubert
b236112069
Split prepare context middleware and fix unit test
2017-09-25 13:40:22 +02:00
Daniel García Aubert
3bab081438
Rename req2params by prepareContext
2017-09-22 17:56:47 +02:00
Daniel García Aubert
8139cdf8b2
Use req2params middleware for name maps static views endpoint
2017-09-22 00:58:44 +02:00
Daniel García Aubert
a8898a8022
Use req2params middleware for name maps tile endpoint
2017-09-22 00:48:44 +02:00
Daniel García Aubert
429f070372
Pass node's response object to req2params
2017-09-21 12:22:33 +02:00
Daniel García Aubert
daeae5d95c
Implement error-middleware to handle errors at top level
2017-09-21 11:46:42 +02:00
Raul Ochoa
91ce3a5489
Going green: allow to use bbox param, along lon, lat, and zoom
...
The `bbox` param was removed from the base controller, the rest kept
working as they are declared in the base, but it's better to declare
them here as well.
Fixes #735 .
2017-08-29 13:05:03 +00:00
Raul Ochoa
c325df1414
Merge pull request #655 from CartoDB/static-maps-layers-filter
...
Static maps layers filter
2017-04-03 12:07:38 +02:00
Raul Ochoa
cad02bfad7
Remove all conditional branches to call req.profiler
...
req.profiler is created in a middleware for all requests.
2017-03-30 20:31:53 +02:00
Raul Ochoa
94299f0452
Configure extra allowed params per endpoint via middleware
...
Instead of making all params available in all endpoints, we control
what endpoints allow what extra params.
Dataviews endpoints should be migrated to this.
2017-03-30 20:12:55 +02:00
Daniel García Aubert
908070ecd7
Fix jshint issue
2016-09-01 16:53:10 +02:00
Daniel García Aubert
7c6a58cd30
Made explicit to recreate named-map-provider
2016-09-01 16:42:06 +02:00
Daniel García Aubert
b0990a1132
Removed template-maps backend from named-maps controller
2016-09-01 16:31:30 +02:00
Daniel García Aubert
e0d304b033
Applied approach similar to static image options
2016-09-01 12:37:04 +02:00
Daniel García Aubert
1bed8623a2
Overwrites rendererparams instead of layergroup in mapconfig
2016-08-31 20:40:55 +02:00
Daniel García Aubert
30c4b00f33
New approach: decorates named_map_provider to return the with visible layers
2016-08-31 19:40:00 +02:00
Raul Ochoa
6639664b3f
Allow override zoom+center or bbox for static named maps previews
2016-05-09 21:13:13 +02:00