| Server IP : 213.186.33.4 / Your IP : 216.73.216.193 Web Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : awebpaca ( 35430) PHP Version : 8.5.0 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/awebpaca/360/campeole-eurosurf/indexdata/graphics/KolorMap/lib/ |
Upload File : |
mxn.register('microsoft7', {
Geocoder: {
init: function(){
},
geocode: function(query, rowlimit){
this.row_limit = rowlimit;
var _address = '';
var is_reverse = false;
if (typeof(query) == 'object') {
// query is a LatLonPoint object (reverse geocode)
if (query.hasOwnProperty('lat') && query.hasOwnProperty('lon')) {
_address = query.lat + ',' + query.lon;
} else {
// query is an address object
_address = [ query.street, query.locality, query.region, query.country ].join(',');
}
} else{
// query is an address string
_address = query;
}
jsonp_callback_context = this;
var searchRequest = 'http://dev.virtualearth.net/REST/v1/Locations/' + _address + '?output=json&jsonp=jsonp_callback_context.geocode_callback&key=' + microsoft_key;
var mapscript = document.createElement('script');
mapscript.type = 'text/javascript';
mapscript.src = searchRequest;
document.body.appendChild(mapscript);
},
geocode_callback: function(results) {
if (results.statusDescription != 'OK') {
this.error_callback(results.statusDescription);
}
else {
var places = [];
for (i=0; i<results.resourceSets[0].resources.length; i++) {
place = results.resourceSets[0].resources[i];
var return_location = {
street: place.address.addressLine,
locality: place.address.locality,
postcode: place.address.postalCode,
region: place.address.adminDistrict,
country: place.address.countryRegion,
point: new mxn.LatLonPoint(place.point.coordinates[0], place.point.coordinates[1])
};
// Remove sovereign entity
if (place.entityType != ('Sovereign') && place.entityType != ('CountryRegion')) {
places.push(return_location);
}
}
if (places.length > this.row_limit) {
places.length = this.row_limit;
}
this.callback(places);
}
}
}
});