Thread: [pmapper-users] Pmapper5: zoom to selected features
Brought to you by:
arminburger
From: gioza <al...@al...> - 2014-06-06 07:54:22
|
Hi, in pmapper5 using the search box or select by shape, have any of you realised that the function "zoom to selected features" doesn't display the complete extent of selected items? -- View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-zoom-to-selected-features-tp4025486.html Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com. |
From: gioza <al...@al...> - 2014-10-10 09:38:53
|
I figured out with a change to pm.map.js: add to line 162->166 the map.zoomOut() control in this way: FROM zoom2extent: function(layer, idx, extStr, zoomfull) { var ext = extStr.split(","); map.zoomToExtent( new OpenLayers.Bounds(ext[0], ext[1], ext[2], ext[3]), true ); }, TO zoom2extent: function(layer, idx, extStr, zoomfull) { var ext = extStr.split(","); map.zoomToExtent( new OpenLayers.Bounds(ext[0], ext[1], ext[2], ext[3]), true ); map.zoomOut(); }, As you select a features by "search tools" the zoomToextent will zoom out so that all the features you selected with the query are completely visible -- View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-zoom-to-selected-features-tp4025486p4025632.html Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com. |
From: gioza <al...@al...> - 2014-10-10 13:39:51
|
for better performance add PM.Map.clearHighlight in pm.query.js in this way: after line 81 execute: function(queryUrl, queryParams) { PM.Map.clearHighlight(); var self = this; ... -- View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-zoom-to-selected-features-tp4025486p4025633.html Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com. |
From: gioza <al...@al...> - 2014-10-10 19:06:44
|
a much better solution for my work is to modify pm.map.js in this way: line 162 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 ); }, the previous solution gives problem with History Navigation... -- View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-zoom-to-selected-features-tp4025486p4025634.html Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com. |
From: gioza <al...@al...> - 2014-10-10 19:19:16
|
according to your project extension you have to set the coefficent which adjust the extent of the selected features: var minx = (ext[0]**0.9999*); var miny = (ext[1]**0.9999*); var maxx = (ext[2]**1.000*1); var maxy = (ext[3]**1.0001*); -- View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-zoom-to-selected-features-tp4025486p4025635.html Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com. |
From: Armin B. <arm...@gm...> - 2014-10-10 21:22:05
|
an even better solution is to use the config parameters <pointBuffer> <shapeQueryBuffer> and adapt them to the coordinate system used for your map and typical scales used for tour application... On 10/10/2014 09:06 PM, gioza wrote: > a much better solution for my work is to modify pm.map.js in this way: > > line 162 > > 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 ); > > > }, > > the previous solution gives problem with History Navigation... > > > > -- > View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-zoom-to-selected-features-tp4025486p4025634.html > Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer > Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports > Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper > Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer > http://p.sf.net/sfu/Zoho > _______________________________________________ > pmapper-users mailing list > pma...@li... > https://lists.sourceforge.net/lists/listinfo/pmapper-users > |
From: gioza <al...@al...> - 2014-10-12 17:48:47
|
I khow but it doesn't work for "selected features" using the search tool -- View this message in context: http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-zoom-to-selected-features-tp4025486p4025637.html Sent from the pmapper-users -- p.mapper users mailing list mailing list archive at Nabble.com. |