Library design: Layer coodinates/origin

I am working on a vector map library where you can add plain image and vector layers to a map. The map itself consists of an infinite coordinate system and each layer is a coordinate system of it's own.

However I'm uncertain how layers should be added to the map coordinate system.

The current implementation places the layer's center around given coordinates and scales the layer to a given size:

`map.add(new layer(image="url", cx, cy, width, height))` -> Figure1

Another option would be to place the layer's origin (bottom left corner) to the given coordinates:

`map.add(new layer(image="url", ox, oy, width, height))` -> Figure2

The third option would be to let the user provide 2 coordinates i.e. bottom left and top right so that width and height can be omitted:

`map.add(new layer(image="url", {x, y}, {x, y}))` -> Figure3

This Polymaps example uses the third approach

Question:

What would you recommend: Are there any conventions, how layers (image or vector) are usually positioned on a map?

-
Why is the map coordinate system infinite? The earth isn't. – CL. Oct 15 '12 at 8:50
How does the layers' metadata specifiy coordinate systems? – CL. Oct 15 '12 at 8:50
@CL. Why infinite? - The map uses an infinite Cartesian coordinate system for low level representation, so that the map can display virtually any 2D Data and not only earth (there are also technical reasons). For geographic coordinate systems, a higher level interface can be used. How specify coordinate system? I am not sure what you mean, but a layer can be any data, e.g. the image from the Polymaps example. – taffer Oct 15 '12 at 15:10