0

my google map works very well except that the language is not English but Chinese, I need it to be default in English, and anoter problem is infobox size isa little big than what I need, pls see the attached shot, when I click the marker, the infobox display is over the map canvas.

here is the code, and pls help me improve it if anyone here could. thank you in advance.

eta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
    function initialize() {
        var latlng = new google.maps.LatLng(23.203984,113.251772);
        var settings = {
            zoom: 15,
            center: latlng,
            mapTypeControl: true,
            mapTypeControlOptions: {style: google.maps.MapTypeControlStyle.DROPDOWN_MENU},
            navigationControl: true,
            navigationControlOptions: {style: google.maps.NavigationControlStyle.SMALL},
            mapTypeId: google.maps.MapTypeId.ROADMAP
    };
var map = new google.maps.Map(document.getElementById("map_canvas"), settings);
  var companyPos = new google.maps.LatLng(23.203984,113.251772);
  var companyMarker = new google.maps.Marker({
      position: companyPos,
      map: map,
      title:"Some title"
  });
var contentString = '<div id="content">'+
    '<div id="siteNotice">'+
    '</div>'+
    '<h1 id="firstHeading" class="firstHeading">Zooqc, Co Ltd</h1>'+
    '<div id="bodyContent">'+
    '<p>we are professional manufacturer and distributor of fashion accessory products, welcome to visit our office and facilities.</p>'+
    '</div>'+
    '</div>';

var infowindow = new google.maps.InfoWindow({
    content: contentString
});
google.maps.event.addListener(companyMarker, 'click', function() {
  infowindow.open(map,companyMarker);
});

}
</script>
Attachments 1.JPG 95.45 KB
3
Contributors
9
Replies
18
Views
4 Years
Discussion Span
Last Post by AleMonteiro
0

my google map works very well except that the language is not English but Chinese, I need it to be default in English, and anoter problem is infobox size isa little big than what I need, pls see the attached shot, when I click the marker, the infobox display is over the map canvas.

I mean the way you explain the issue I feel that you didn't read Google Map FAQ yet:

Read this:

http://support.google.com/maps/bin/answer.py?hl=en&answer=63471

0

Your infowindow problem seems to be an CSS problem and also you have an empty div that occupies space.
Try removing the empty div and change <h1> to <span>

0

Hello AleMonteiro

I don't know very well what you mean, because I just copy the code and create the map for my website, I have changed the language to English, but could you let me know how to improve it detail.

22.var contentString = '<div id="content">'+23.    '<div id="siteNotice">'+24.    '</div>'+25.    '<h1 id="firstHeading" class="firstHeading">Zooqc, Co Ltd</h1>'+26.    '<div id="bodyContent">'+27.    '<p>we are professional manufacturer and distributor of fashion accessory products, welcome to visit our office and facilities.</p>'+28.    '</div>'+29.    '</div>';

I know the this is a Div, but I couldn't find how to define it in Dreamweaver, thank you.

0

Try like this:

var contentString = '<div id="content">'+
    '<span id="firstHeading" class="firstHeading">Zooqc, Co Ltd</span>'+
    '<div id="bodyContent">'+
    '<p>we are professional manufacturer and distributor of fashion accessory products, welcome to visit our office and facilities.</p>'+
    '</div>'+
    '</div>';

And also you should check your css for firstHeading class.

0

Hello AleMonteiro
thank you for your kindness, I know how to specify the size in CSS, even I can't find it in my CSS styles, but I only need to add it in my code named bodyContent, then I can specify the font size and header size and color,

anyway, thank you for your help.

0

85e8ed6117d92d2bc9cf03cdff750011 Hi AleMonterio

do you know how to control the space between firstheading and bodycontent, I have improve it like this, but I hope it could be smaller than this. thank you if you could help.

Bill

Edited by cmabill

0

Bill, it's all about CSS.

If you just want to bring the body content up, set margin-top: -10px;. Or decresce the first heading font-size.

0

Hello AleMonteiro

thank you for your time and help. and I think I could make it, have a nice weekend.

Bill

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.