Poll David
Posts: 0
Joined: Sat Jan 24, 2015 5:22 am

Open infowindow from Google Place Result using List Component

I have here a result from Google Places NearbySearch. I also displayed the results using the List Service on a List Component.

The infowindow seems to be working fine when clicking the markers. But what I wanted to do is open the infowindow using the List Component. So when I click a certain list, it's corresponding infowindow should open.

Question is: How can I open the infowindow using the List component?

Thanks in advance!

Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Open infowindow from Google Place Result using List Component

Hello!

You would have to check Google map API and use custom JS to open info window. This post might give you some clue https://getsatisfaction.com/apperyio/...

Poll David
Posts: 0
Joined: Sat Jan 24, 2015 5:22 am

Open infowindow from Google Place Result using List Component

Hi, i think that post didn't help me..

Clicking / Tapping on my Map Markers opens an infowindow.

What I am trying to do is Open INFOWINDOW by clicking / tapping the List Component that corresponds the map marker.. THE LIST COMPONENT not the MARKER

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Open infowindow from Google Place Result using List Component

Hi Poll,

It's up to you how to implement you logic.

In accordance to the google map api V3 you can open infowindow with following JS code:

precode

//Replace "multiGoogleMap" with your map component name.
var map = Appery("multiGoogleMap").options.mapElement.gmap('get', 'map');

var infowindow = new google.maps.InfoWindow({
content: '<div style="height:80px;">test content<>',
maxWidth: 320
});

infowindow&#46;open(map);

&#47;&#47;Example how to link infowindow to some marker&#46;
&#47;&#47;infowindow&#46;open(map, marker);

/code/pre

If you want to open this infowindow near some marker - you need to pass this marker in last line of given code.

Regards

Return to “Issues”