So I'm trying to open up an htm file throw a WPF UI(XAML) hyperlink and pass some coordinates to the htm file, which uses javascript to create a map that centers around, hopefully, the coordinates I'm trying to pass. coord1 and coord2 are doubles.
private void Hyperlink_RequestNavigate(object sender, RequestNavigateEventArgs e)
{
String coords = coord1 + " " + coord2;
Process.Start(new ProcessStartInfo(e.Uri.AbsoluteUri, coords));
e.Handled = true;
}
This is the javascript end where I'm trying to receive the variable coords:
<script type='text/javascript'>
var map;
var coords = '<%=coords%>';
function GetMap() {
map = new Microsoft.Maps.Map('#myMap', {center: new Microsoft.Maps.Location(55, 0)});
...
I got '<%=coords%>' from online but it literally just returns <%=coords>. I'm trying to take the two coordinate points to replace the 55 and 0.
I didn't post the XAML code, but the C# code opens up the htm file when a hyperlink is clicked and I believe the string "coords" is being passed with the data, but I just don't know how to receive it.