In pmapper5 if you modify PM.Control.PMToolClick.js in the bottom of its part
in this way:

  onClick: function(e) {
        var fromProjection = new OpenLayers.Projection("EPSG:900913");   //
Transform from Spherical Mercator Projection WGS 1984
        var toProjection   = new OpenLayers.Projection("EPSG:4326"); // to
WGS 1984
        var xyMap = map.getLonLatFromViewPortPx(e.xy);
        var mouseXY = (xyMap.lon) + ',' + (xyMap.lat);
                var position = new 
OpenLayers.LonLat(xyMap.lon,xyMap.lat).transform(
fromProjection, toProjection);          
         


this.execute(mouseXY);
                this.execute(position);



myWindow=window.open('YOURNAME','YOURNAME2','width=200,height=200');
myWindow.document.write(" <form
action='http://yoursite.com/&lt;b>coordinate.php*' method='post'> cod:
<input type='varchar' name='cod'><br>Latitudine: <input type='double'
name='lat' value="+position.lat+"><br>Longitudine: <input type='double'
name='lon' value="+position.lon+"><br><input type='submit'></form>  "           
 
);
myWindow.focus();

    
        
},
        
    execute: function(mouseXY) {
        console.log(mouseXY);
    },
    
        
    CLASS_NAME: "OpenLayers.Control.PMToolClick"

});

the code gets the coordinate by clicking on your map and open
"coordinate.php" which is a google streetview api
(https://developers.google.com/maps/documentation/javascript/examples/streetview-service)
in the position where you clicked



--
View this message in context: 
http://pmapper-users-p-mapper-users-mailing-list.993774.n3.nabble.com/Pmapper5-or-4-x-and-streetview-tp4025487.html
Sent from the pmapper-users -- p.mapper users mailing list mailing list archive 
at Nabble.com.

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
pmapper-users mailing list
pmapper-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to