Commit Graph

17 Commits

Author SHA1 Message Date
Guillaume Beraudo 630d9c5200 Fix proj4 type
Previous typing was confusing the compiler. It could not figure out the
difference between the proj4 property and the constructor, which lead to
errors such as:

- ol.proj.setProj4(proj4)
ERR! compile /home/gberaudo/dev/ngeo/src/proj/epsg21781.js:8: ERROR - actual parameter 1 of ol.proj.setProj4 does not match formal parameter
ERR! compile found   : function (new:proj4): ?
ERR! compile required: (null|proj4)
ERR! compile   ol.proj.setProj4(proj4);
ERR! compile                    ^^^^^

- ol.proj.proj4.get().defs('EPSG:21781', epsg21781def)
ERR! compile /home/gberaudo/dev/ngeo/src/proj/epsg21781.js:26: ERROR - Property defs never defined on proj4
ERR! compile   ol.proj.proj4.get().defs('EPSG:21781', epsg21781def);
ERR! compile                       ^^^^
2017-03-22 09:47:29 +01:00
Bart van den Eijnden cdf9a8e84d Add ol.proj.setProj4 function 2016-01-04 18:51:04 +01:00
Andreas Hocevar 0a01f8ef7e Simplify ol.proj.addCoordinateTransforms
Equivalent projections do not need to be handled here, and the forward
and inverse functions can be function arguments instead of being nested
in an object literal.
2014-07-09 15:33:13 +02:00
Andreas Hocevar 90c745006d Update to use the documented Proj4js 2.2.x API 2014-07-09 15:33:12 +02:00
Andreas Hocevar 8b2277cdda Use proj4.defs instead of proj4.Proj, to conform with the proj4js API 2014-07-08 22:06:21 +02:00
Andreas Hocevar dc09b0a27f Update externs and ol.HAVE_PROJ4JS for new proj4js API 2014-07-08 22:06:20 +02:00
Tim Schaub fe60d07ef0 Externs lint 2014-04-04 09:28:36 -06:00
Tim Schaub d10eff97a2 Allow getMetersPerUnit to work without units identifier (see #814) 2013-06-24 11:34:16 -06:00
Bruno Binet bb1cf45c0a Add Proj4js.Proj.srsCode property to Proj4js externs 2013-03-06 02:38:03 +01:00
Tom Payne 6b26cbfb38 Refactor projection architecture 2013-03-03 12:22:24 +01:00
Tom Payne e3bbd67092 Use @nosideeffects in Proj4js externs 2012-07-17 12:12:28 +02:00
Tom Payne 472f6ddd17 Satisfy more recent gjslint 2012-07-17 08:55:45 +02:00
Tom Payne c162f3582d Remove unnecessary comments 2012-07-16 13:10:54 +02:00
Tom Payne 5c168d3b89 Update externs files for gjslint's --limited_doc_files 2012-07-15 22:34:09 +02:00
Tom Payne b6282ba631 No need to create object 2012-07-15 20:40:16 +02:00
Tom Payne 727b2905f7 Suppress gjslint warnings 2012-07-11 17:20:06 +02:00
Tom Payne 48cc0bed93 Add externs for Proj4js 2012-07-11 17:20:06 +02:00