English 中文(简体)
在Sencha Touch 2 点击 go角后显示一种观点(纸浆、集装箱等)。
原标题:Showing a view (Panel, container etc.) after clicking on a google marker in Sencha Touch 2

I have a map on sencha touch 2 that is loaded with markers (dynamically). Currently, when i click on the markers, their respective infowindow opens. I want to have container opened using a button in the infowindow, or by clicking on the marker.

这是否可行,谁能指导我工作? 我只知道它有一点与标志的听众打交道。

问题回答

为了听取点击活动,你可以使用以下代码:

google.maps.event.addListener(marker,  click , onClickHandler);

标志是 go。 标识。

If you want to put a button inside of infoWindow. You could listen for click events in the infoWindow and then check if the click was inside a button.

....
infoWindow.content =  <div>text</div><div class="button">button</div> ;
infoWindow.content.addEventListener( click , onInfoWindowClickHandler);

function onInfoWindowClickHanlder(event) {
   if(event.target.className ==  button ) {
      // Button click
   }
}

这只是一个近似。 我没有测试该守则,因此可能需要一些警示,但这一想法应当发挥作用。

页: 1





相关问题
How to decide the current point reach on google map?

How to decide the current point reach on google map? I have a list of points (pickup points) of a route that I want to show in my google map with polyline. Now i have to get the current location of ...

Topographical or relief data in Map APIs

I was wondering if anyone knew of any map APIs that offer topographical or relief data? I ve had a quick look at Google and Bing APIs, but could find nothing there. Google allow you to view a map as ...

Using maps on Windows Mobile

I m experimenting with maps on different mobile platforms. Getting Google Maps to work on Android was easy, following this tutorial. Getting the same to work on Windows Mobile is a different matter. ...

Adding a custom icon to a google map

I need a hand adding a custom icon to some Google Maps javascript. Code below for your reference: function populateMap() { var map = new GMap2(document.getElementById("map")); map.setCenter(new ...

RSS to KML Overlay

I m want to display my blog as a Google Map overlay (each post contains geotags). How can I dynamically create a KML overlay from an RSS? Or better, how can I create a loop (PHP) that would display ...

开放街道地图管理员

我需要开放Street的标记管理员。 地图,如山角地图。

热门标签