English 中文(简体)
go角地图
原标题:google maps api v3 marker click not working

不能确定问题在何地发生,而是在几个月后用纸张的面印章绘制了 go图。 当时,信息窗口正在运转。

i 一直把它推到一个新的地点,无法打开信息窗口,在制造点击事件时, j的警示在正确点,但点击事件并不影响所有方面,因此看上去了最后的现场,而现在也没有在那里工作。

因此,《法典》必须创建“信息窗口”的机体,以确保如何确定这一点:

markersArray.push(marker);
        markersPosArray.push(myLatLng);
        // Wrapping the event listener inside an anonymous function
        // that we immediately invoke and passes the variable i to.
        (function(myData, marker) {
            alert( creating listener for:  +marker);
            // Creating the event listener. It now has access to the values of
            // myData and marker as they were during its creation
            google.maps.event.addListener(marker,  click , function() {
                //create thecontent for the infowindow
                alert( creating info window );
                var content =  hello there ; //createContent(myData);
                infowindow.setContent(content);
                infowindow.open(map, marker);
            });


        })(myData, marker); 

在一无所知的皮条皮中,可能发生了什么变化?

the testpage can be seen at: http://www.disposalknowhow.com/locator.php In the locator use the following to obtain results:

类型:电气/电子——项目:计算机-雷达:100 - 邮政编码:N11hl

the previous one i did that is not working either now can be seen at: http://www.focus-on-plants.com/locator_iconed.php (can use any parameters here in the form)

最新资料:

答复:

在绘制地图时界定了Infowindow:

var myLatLng = new google.maps.LatLng(51.470, -0.00);
    var bounds = new google.maps.LatLngBounds();
    var geocoder = new google.maps.Geocoder();
    var gotIcons = false;
    var iconImageArray = {image:{}, size:{}, sizeX:{}, sizeY:{}, origin:{}, originX:{}, originY:{}, anchorpoint:{}, anchorpointX:{}, anchorpointY:{}};
    var iconShadowArray = {image:{}, size:{}, sizeX:{}, sizeY:{}, origin:{}, originX:{}, originY:{}, anchorpoint:{}, anchorpointX:{}, anchorpointY:{}};
    var iconShapeArray = {poly:{}, coord:{}};
    var myIconArray = {icon:{}, shadow:{}, shape:{}}
    var infowindow = new google.maps.InfoWindow();
    var markersArray = []; // to store out markers
    var markersPosArray = []; // to store lat/lang of markers for zooming function
    var markersInfoArray = [];
    // MAP OPTIONS
    var myOptions = {
        zoom: 5,
        center: myLatLng,
        mapTypeId: google.maps.MapTypeId.ROADMAP,
        mapTypeControl: true,
        mapTypeControlOptions: {
            style: google.maps.MapTypeControlStyle.HORIZONTAL_BAR,
            position: google.maps.ControlPosition.BOTTOM
        },
        navigationControl: true,
        navigationControlOptions: {
            style: google.maps.NavigationControlStyle.ZOOM_PAN,
            position: google.maps.ControlPosition.TOP_RIGHT
        },
        scaleControl: true,
        scaleControlOptions: {
            position: google.maps.ControlPosition.TOP_LEFT
        }
    };//end map options
    var map = new google.maps.Map(document.getElementById("loc_map"), myOptions);
问题回答

我正在使用以下法典展示一种胎儿泡沫:

var info_pane = new google.maps.InfoWindow({
                    content: info,
                    disableAutoPan: false,
                    maxWidth:  300px 
                });
info_pane.open(map, marker);




相关问题
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.

热门标签