Rename projection functions for a friendlier API

The following functions are renamed:

getTransform -> getTransformForProjections
getTransformFromCodes -> getTransform
transform -> transformWithProjections
transformWithCodes -> transform

With this change, the faster functions that avoid projection look-up
have longer names and are used internally, whereas the slower but
friendlier short name functions are available for users.
This commit is contained in:
Tom Payne
2013-03-06 19:41:27 +01:00
parent 874583656e
commit 21d34f1cc8
18 changed files with 84 additions and 86 deletions

View File

@@ -9,15 +9,15 @@ goog.require('ol.projection');
goog.require('ol.source.OpenStreetMap');
var london = ol.projection.transformWithCodes(
var london = ol.projection.transform(
new ol.Coordinate(-0.12755, 51.507222), 'EPSG:4326', 'EPSG:3857');
var moscow = ol.projection.transformWithCodes(
var moscow = ol.projection.transform(
new ol.Coordinate(37.6178, 55.7517), 'EPSG:4326', 'EPSG:3857');
var instanbul = ol.projection.transformWithCodes(
var instanbul = ol.projection.transform(
new ol.Coordinate(28.9744, 41.0128), 'EPSG:4326', 'EPSG:3857');
var rome = ol.projection.transformWithCodes(
var rome = ol.projection.transform(
new ol.Coordinate(12.5, 41.9), 'EPSG:4326', 'EPSG:3857');
var bern = ol.projection.transformWithCodes(
var bern = ol.projection.transform(
new ol.Coordinate(7.4458, 46.95), 'EPSG:4326', 'EPSG:3857');
var map = new ol.Map({