Is there an archived version of the previous Silverlgith/WPF API? or if anyone can point me to where I can find more info on the Google Street View integration, I would really appreciate it.
1. If your map is not in Web Mecator, convert to lat -Long 2 . If you open streetview in a new page :
in xaml.cs, some code like the following: string lng = pt.X.ToString(); string lat = pt.Y.ToString(); string urlStr = "StreetView.aspx?lat=" + lat + "&lng=" + lng; HtmlPage.Window.Invoke("open", new object[] { urlStr, "win", "toolbar=no,width=650, height=700" });
in streetView.aspx: <script type="text/javascript">
var myPano;
// Function to retrieve URL parameters
function gup(name) { name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]"); var regexS = "[\\?&]" + name + "=([^&#]*)"; var regex = new RegExp(regexS); var results = regex.exec(window.location.href); if (results == null) return ""; else return results[1]; }
// Initialze the display on the web page
function initialize() { lat = gup('lat'); document.getElementsByTagName("iframe")[0].src = "http://maps.google.com/maps?f=q&source=embed&hl=en&ie=UTF8&ll=" + lat + "," + lng + "&z=16&layer=c&cbll=" + lat + "," + lng + "&cbp=12,326.62,,0,5&output=svembed"; } </script>