If it could help you I describe how I modified the zoom2extent function in
the 'pm.map.js' for my project.

As zoom2extent for multiple selection sometimes doesn't zoom to all
selected, I created 2 zoom2extent functions as follow.
The first one decrease zoom extent by a factor as you can see. In this way
all selected features are included in the view (extent).
The second one is the standard zoom2extent used for a single feature zoomTo.
You have to modified 'pm.queryconfig.js' file where the function is called
(zoom2extent --> zoom2extent2 line 66).


zoom2extent: function(layer, idx, extStr, zoomfull) {
        var ext = extStr.split(",");
                
                var minx = (ext[0]*0.9995);
                var miny = (ext[1]*0.9995);
                var maxx = (ext[2]*1.0005);
                var maxy = (ext[3]*1.0005);
                
                map.zoomToExtent( new OpenLayers.Bounds(minx, miny, maxx, 
maxy), true );
                
          
                                
    },
    
      zoom2extent2: function(layer, idx, extStr, zoomfull) {
        var ext = extStr.split(",");
                
                var minx = (ext[0]);
                var miny = (ext[1]);
                var maxx = (ext[2]);
                var maxy = (ext[3]);
                
                map.zoomToExtent( new OpenLayers.Bounds(minx, miny, maxx, 
maxy), true );
                
          
                                
    },



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/pmapper-users-pm-map-zoom2extent-tp4025762p4025763.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to