場所の地図にマーカーを付けようとしていますが、オプションでエラーが発生しますが、地図を単独で読み込むと正常に動作します
hier は私のコードです
<script type="text/javascript"> //var map; function initialize() { if (GBrowserIsCompatible()) { var lat = parseFloat(document.getElementById("FormView1_LatitudeLabel").textContent); var lng = parseFloat(document.getElementById("FormView1_LongitudeLabel").textContent); // Creating a map // Creating a LatLng object containing the coordinate for the center of the map var latlng = new google.maps.LatLng(lat, lng); // Creating an object literal containing the properties we want to pass to the map var options = { zoom: 7, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP, }; // Calling the constructor, thereby initializing the map var map = new google.maps.Map(document.getElementById('map'), options); var marker = new google.maps.Marker({ position: new google.maps.LatLng(lat, lng), map: map, title: 'My workplace', clickable: false, icon: 'img/factory.png' }); } } </script>