2016-03-20 13:06:58 +00:00
|
|
|
mxn.register('{{api_id}}', {
|
2009-11-18 04:23:13 +00:00
|
|
|
|
|
|
|
Mapstraction: {
|
2016-03-20 13:06:58 +00:00
|
|
|
|
|
|
|
init: function(element, api) {
|
2009-11-18 04:23:13 +00:00
|
|
|
var me = this;
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
applyOptions: function(){
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
2016-03-20 13:06:58 +00:00
|
|
|
resizeTo: function(width, height){
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
addControls: function( args ) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
addSmallControls: function() {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
addLargeControls: function() {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
addMapTypeControls: function() {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
2016-03-20 13:06:58 +00:00
|
|
|
setCenterAndZoom: function(point, zoom) {
|
2009-11-18 04:23:13 +00:00
|
|
|
var map = this.maps[this.api];
|
|
|
|
var pt = point.toProprietary(this.api);
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
addMarker: function(marker, old) {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
var pin = marker.toProprietary(this.api);
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
return pin;
|
|
|
|
},
|
|
|
|
|
|
|
|
removeMarker: function(marker) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
removeAllMarkers: function() {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
declutterMarkers: function(opts) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
addPolyline: function(polyline, old) {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
var pl = polyline.toProprietary(this.api);
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
return pl;
|
|
|
|
},
|
|
|
|
|
|
|
|
removePolyline: function(polyline) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
getCenter: function() {
|
|
|
|
var point;
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
return point;
|
|
|
|
},
|
|
|
|
|
|
|
|
setCenter: function(point, options) {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
var pt = point.toProprietary(this.api);
|
2016-03-20 13:06:58 +00:00
|
|
|
if(options && options.pan) {
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
}
|
2016-03-20 13:06:58 +00:00
|
|
|
else {
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
setZoom: function(zoom) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
},
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
getZoom: function() {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
var zoom;
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
return zoom;
|
|
|
|
},
|
|
|
|
|
|
|
|
getZoomLevelForBoundingBox: function( bbox ) {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
// NE and SW points from the bounding box.
|
|
|
|
var ne = bbox.getNorthEast();
|
|
|
|
var sw = bbox.getSouthWest();
|
|
|
|
var zoom;
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
return zoom;
|
|
|
|
},
|
|
|
|
|
|
|
|
setMapType: function(type) {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
switch(type) {
|
|
|
|
case mxn.Mapstraction.ROAD:
|
|
|
|
// TODO: Add provider code
|
|
|
|
break;
|
|
|
|
case mxn.Mapstraction.SATELLITE:
|
|
|
|
// TODO: Add provider code
|
|
|
|
break;
|
|
|
|
case mxn.Mapstraction.HYBRID:
|
|
|
|
// TODO: Add provider code
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
}
|
2009-11-18 04:23:13 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
getMapType: function() {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
|
|
|
|
//return mxn.Mapstraction.ROAD;
|
|
|
|
//return mxn.Mapstraction.SATELLITE;
|
|
|
|
//return mxn.Mapstraction.HYBRID;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
getBounds: function () {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
//return new mxn.BoundingBox( , , , );
|
|
|
|
},
|
|
|
|
|
|
|
|
setBounds: function(bounds){
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
var sw = bounds.getSouthWest();
|
|
|
|
var ne = bounds.getNorthEast();
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
addImageOverlay: function(id, src, opacity, west, south, east, north, oContext) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
setImagePosition: function(id, oContext) {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
var topLeftPoint; var bottomRightPoint;
|
|
|
|
|
|
|
|
// TODO: Add provider code
|
|
|
|
|
|
|
|
//oContext.pixels.top = ...;
|
|
|
|
//oContext.pixels.left = ...;
|
|
|
|
//oContext.pixels.bottom = ...;
|
|
|
|
//oContext.pixels.right = ...;
|
|
|
|
},
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
addOverlay: function(url, autoCenterAndZoom) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
addTileLayer: function(tile_url, opacity, copyright_text, min_zoom, max_zoom) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
toggleTileLayer: function(tile_url) {
|
|
|
|
var map = this.maps[this.api];
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
getPixelRatio: function() {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
|
2016-03-20 13:06:58 +00:00
|
|
|
// TODO: Add provider code
|
2009-11-18 04:23:13 +00:00
|
|
|
},
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
mousePosition: function(element) {
|
|
|
|
var map = this.maps[this.api];
|
|
|
|
|
2016-03-20 13:06:58 +00:00
|
|
|
// TODO: Add provider code
|
2009-11-18 04:23:13 +00:00
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
LatLonPoint: {
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
toProprietary: function() {
|
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
2016-03-20 13:06:58 +00:00
|
|
|
fromProprietary: function(point) {
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
}
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
Marker: {
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
toProprietary: function() {
|
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
2016-03-20 13:06:58 +00:00
|
|
|
openBubble: function() {
|
2009-11-18 04:23:13 +00:00
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
hide: function() {
|
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
show: function() {
|
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
update: function() {
|
|
|
|
// TODO: Add provider code
|
|
|
|
}
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
Polyline: {
|
|
|
|
|
|
|
|
toProprietary: function() {
|
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
show: function() {
|
|
|
|
// TODO: Add provider code
|
|
|
|
},
|
|
|
|
|
|
|
|
hide: function() {
|
|
|
|
// TODO: Add provider code
|
|
|
|
}
|
2016-03-20 13:06:58 +00:00
|
|
|
|
2009-11-18 04:23:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
});
|