/* * To change this template, choose Tools | Templates * and open the template in the editor. */ String.prototype.mp_replaceAll=function(s1, s2) {return this.split(s1).join(s2)} function getMapImageURL(map_view, map_width, map_height) { if(!(map_view instanceof Map24.Rectangle)){ throw new Map24.Exception.InvalidArgument("The given parameter 'map_view' is no Map24.Rectangle instance!",map_view,"Map24.Map","getMapImageURL"); } if(typeof map_width == "undefined"){ map_width = 500; } else{ map_width = parseInt(map_width); } if(typeof map_width != "number"){ map_width = 500;} if(typeof map_height == "undefined"){ map_height = 500; } else{ map_height = parseInt(map_height); } if(typeof map_height != "number"){ map_height = 500;} var mapImageURL = Map24.getWebServicesBaseUrl()+ '?mid=***'+ '&cgi=Map24RenderEngine'+ '&action=renderMapImage'+ '&iw='+map_width+'&ih='+map_height+ '&sid='+Map24.MapApplication.Map.Session.SessionId+ '&view=printview'; //'&prop:tile=1&prop:ExpansionStyle=mapview'; mapImageURL += '&view0=printview&cmd0=MOV'+ '&x0|0='+map_view.TopLeft.Longitude+ '&x0|1='+map_view.LowerRight.Longitude+ '&y0|0='+map_view.TopLeft.Latitude+ '&y0|1='+map_view.LowerRight.Latitude+ '&t='+((new Date()).getTime()); return mapImageURL; } function getMapImage(map_width,map_height) { var map = Map24.MapApplication.Map; var mapclient=map.MapClient[Map24.MapApplication.getMapType()]; var footerBarHeight = 20; var url = getMapImageURL(mapclient.getCurrentMapView(), parseInt(map_width), (parseInt(map_height)-footerBarHeight)); return url; }