How to add a text-button (like a hyperlink)?

D

Daniish

Hello,

I want to include a bit of text in my Google Map Infowindow - that
when clicked maximises the infowindow.

This is the code for maximising the infowindow
map.getInfoWindow().maximize();

the text could be something as simple as:
"Open"

How do i add that to the following line of Javascript:
var info = '<div id="info" style="text-align:left";><h3>' + title + '</
h3><br>' + date + '</div>';


Many thanks for your help
 
S

SAM

Daniish a écrit :
Hello,

I want to include a bit of text in my Google Map Infowindow - that
when clicked maximises the infowindow.

This is the code for maximising the infowindow
map.getInfoWindow().maximize();

the text could be something as simple as:
"Open"

How do i add that to the following line of Javascript:
var info = '<div id="info" style="text-align:left";><h3>' + title + '</
h3><br>' + date + '</div>';


var info = '<div id="info" style="text-align:left";><h3>' + title +
'<\/h3><br>' + date + '<br>' +
'<button onclick="map.getInfoWindow().maximize();">zoom<\/button>' +
'<\/div>';


var info = '<div id="info" style="text-align:left";><h3>' + title +
'<\/h3><br>' + date + '<br>' +
'<a href="javascript:map.getInfoWindow().maximize();">zoom<\/a>' +
'<\/div>';


var info = '<div id="info" style="text-align:left";><h3>' + title +
'<\/h3><br>' + date + '<br>' +
'<button onclick="map.getInfoWindow().maximize();" '+
'title="click to zoom">+<\/button>' +
'<\/div>';


var info = '<div id="info" style="text-align:left";><h3>' + title +
'<\/h3><br>' + date + '<br>' +
'<a href="javascript:map.getInfoWindow().maximize();"' +
'title="click to zoom" "style="text-decoration:none">[+]<\/a>' +
'<\/div>';


etc ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,817
Members
47,366
Latest member
IanCulpepp

Latest Threads

Top