How to pass information from a WPF app to an HTML page


I got a WPF application which finds locations of latitude and longitude, and display them to the user inside the app. The app got a button that when clicked, is supposed to open a map using the Google maps API and display these locations on the map using markers.

I got this below script inside an HTML which as of now just opens a map on a fixed location and displaying just a sample marker.

  function initMap() {
    let myLatLng = {lat: -25.363, lng: 131.044};

    let map = new google.maps.Map(document.getElementById('map'), {
      zoom: 4,
      center: myLatLng

    let marker = new google.maps.Marker({
      position: myLatLng,
      map: map,
      title: 'TITLE!'
<script async defer

So I know that in order to open the page itself all I need to do is:


but how exactly can I pass the locations I find in the WPF side to the JS initMap function?