English 中文(简体)
果敢地图的展示?
原标题:google maps map wont show up?
var center = new google.maps.LatLng(18.133333, 21.566667);
var map = new google.maps.Map(document.getElementById( map ), {zoom: 11,center: center,mapTypeId: google.maps.MapTypeId.TERRAIN});

I have a DIV by the name map in my html.

    <div id="map"></div>

The JS is in a function listed in myscript.js which I reference in my index.html

-------------edit---------- google maps ref

<script src="http://maps.google.com/maps/api/js?sensor=false"></script>
最佳回答

Set一.。

页: 1

 style= width:500px; height: 500px 

或中央直辖区

#map { width: 500px; height: 500px }
问题回答

您是肯定你把 go光地图放到AF子上?

<!-- Add jQuery-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Add google maps API -->
<script async defer src="https://maps.googleapis.com/maps/api/js?key=place your api key here&callback=initMap"></script>
<script src="assets/js/googleMapsApi.js"></script>




相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签