Rewrite part of javascript with C# -


i'm writing program in c# should display google maps. i'm using google maps javascript api best 1 find. program should able search places.

the code:

window.onload = function() {        var latlng = new google.maps.latlng(52.785804, 6.897585);      var options = {          zoom: 15,          center: latlng,          maptypeid: google.maps.maptypeid.roadmap      };      var map = new google.maps.map(document.getelementbyid("map"), options);  }
html, body {      margin: 0;      width: 100%;      height: 100%;      overflow: hidden;  }    #map {      width: 80%;      height: 100%;  }
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">  <html>    <head>      <title>google maps</title>      <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>    </head>    <body>      <div id="map">      </div>  </body>    </html>

am in way able edit latlng using c#? or know alternative way use google maps api c#?

if not using mvc or other server side technologies on specific page option load lat/long ajax call.

$.ajax({     url: "url/to/your/api/that/returns/lat/long",     success: function(result) {         // process json result , set lat/long     } }); 

the api can written on server side using language (including c#)


Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -