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?