This is a great idea!
However, I need to get center point when I create basemap.
I am tyring to create custom basemap layer by extending TiledMapServiceLayer class.
Because the tile service uses different schema, I concluded I need center point to retrieve tiles.
The snippet below is what I've done so far.
var CustomLayer = declare([TiledMapServiceLayer], {
constructor: function(){
this.spatialReference = new SpatialReference(...);
this.initialExtent = (this.fullExtent = new Extent(...));
this.tileInfo = new TileInfo({
rows: 256,
cols: 256,
dpi: 96,
format: "png",
compressionQuality: 90,
origin: {x: -2.0037508342787E7, y: 2.0037508342787E7},
spatialReference: {wkid: 102100},
lods: [
{ level: 0, resolution: 156543.03392800014, scale: 5.91657527591555E8 },
{ level: 1, resolution: 78271.51696399994, scale: 2.95828763795777E8 },
.....
]
});
this.loaded = true;
this.onLoad(this);
},
getTileUrl: function(level, row, col) {
return url;
}
});