Click here to Skip to main content
15,892,059 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Object does not support property or method 'hasAttribute'

am using webbrowser control to show the static web page.

please provide me the needfull


C#
Dim curDir As String = Directory.GetCurrentDirectory()
        Me.WebBrowser1.Url = New Uri([String].Format("file:///{0}/heatmap.html", curDir))



html page

XML
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Heatmaps</title>
    <style>
      html, body, #map-canvas {
        height: 100%;
        margin: 0px;
        padding: 0px
      }
      #panel {
        position: absolute;
        top: 5px;
        left: 50%;
        margin-left: -180px;
        z-index: 5;
        background-color: #fff;
        padding: 5px;
        border: 1px solid #999;
      }
    </style>
    <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true&libraries=visualization"></script>
    <script>
// Adding 500 Data Points
var map, pointarray, heatmap;

var taxiData = [
  new google.maps.LatLng(11.0 , 10.0 ),
  new google.maps.LatLng(6.5, 9.5),
  new google.maps.LatLng(17.567 , 3.98),
  new google.maps.LatLng(9.067 , 8.667),
  new google.maps.LatLng(14.48, 14.45),
  new google.maps.LatLng(40.41 , 3.7 ),
  new google.maps.LatLng(55.36 ,3.43 ),
  new google.maps.LatLng(37.08 , 95.7 ),


];

function initialize() {
  var mapOptions = {
    zoom: 3,
    center: new google.maps.LatLng(11.0, 10.0),
    mapTypeId: google.maps.MapTypeId.SATELLITE
  };

  map = new google.maps.Map(document.getElementById('map-canvas'),
      mapOptions);

  var pointArray = new google.maps.MVCArray(taxiData);

  heatmap = new google.maps.visualization.HeatmapLayer({
    data: pointArray
  });

  heatmap.setMap(map);
}

function toggleHeatmap() {
  heatmap.setMap(heatmap.getMap() ? null : map);
}

function changeGradient() {
  var gradient = [
    'rgba(0, 255, 255, 0)',
    'rgba(0, 255, 255, 1)',
    'rgba(0, 191, 255, 1)',
    'rgba(0, 127, 255, 1)',
    'rgba(0, 63, 255, 1)',
    'rgba(0, 0, 255, 1)',
    'rgba(0, 0, 223, 1)',
    'rgba(0, 0, 191, 1)',
    'rgba(0, 0, 159, 1)',
    'rgba(0, 0, 127, 1)',
    'rgba(63, 0, 91, 1)',
    'rgba(127, 0, 63, 1)',
    'rgba(191, 0, 31, 1)',
    'rgba(255, 0, 0, 1)'
  ]
  heatmap.set('gradient', heatmap.get('gradient') ? null : gradient);
}

google.maps.event.addDomListener(window, 'load', initialize);

    </script>
  </head>

  <body>

    <div id="map-canvas"></div>
  </body>
</html>
Posted
Updated 9-Feb-15 20:31pm
v2
Comments
Kornfeld Eliyahu Peter 10-Feb-15 2:26am    
You should show your code with the error...
durgesh j 10-Feb-15 2:30am    
Dim curDir As String = Directory.GetCurrentDirectory()
Me.WebBrowser1.Url = New Uri([String].Format("file:///{0}/heatmap.html", curDir))
durgesh j 10-Feb-15 2:32am    
updated the question plz go through and provide the needfull

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900