Page 1 of 1

Open infowindow from Google Place Result using List Component

Posted: Thu Feb 12, 2015 4:11 am
by Poll David

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


Open infowindow from Google Place Result using List Component

Posted: Thu Feb 12, 2015 9:44 am
by Maryna Brodina

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/...


Open infowindow from Google Place Result using List Component

Posted: Fri Feb 13, 2015 3:49 am
by Poll David

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


Open infowindow from Google Place Result using List Component

Posted: Mon Feb 16, 2015 5:25 am
by Yurii Orishchuk

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