DMXzone Google Maps Support Product Page

How do you mix text with a recordset in the description area?

Asked 23 Jun 2013 05:44:11
1
has this question
23 Jun 2013 05:44:11 Bill Elkerton posted:
How do you mix text with a recordset in the description area? I have a recordset that loops through a set of records to put the information in each balloon that is displayed above each marker, when I add a few static text words in front of the recordset the map will only show one marker. How do I format the static text entered before the recordset so all data will appear in the balloon above the marker?

Thanks
Bill

Replies

Replied 24 Jun 2013 07:06:53
24 Jun 2013 07:06:53 Miroslav Zografski replied:
Hello Bill,
Please, provide a link to the page in question in order of our answer to be exactly for your case.

Regards.
Replied 24 Jun 2013 15:54:43
24 Jun 2013 15:54:43 Bill Elkerton replied:
Miroslav, this link has two recordsets , when you click the marker two records show up a date and a description, I want to put text that states "Date of Hunt" and "Name of Hunt" before each recordset. I tried to put a space between the the two recordsets and it will only show one marker when run, I take out the space and it shows all markers.

www.sdthunters.com/whereIhid.asp?hider=1
www.sdthunters.com/whereIhid.asp?hider=1

I have another extension that I got from your competition that works the way I want it to except it doesn't have the bells and whistles your extension has available. here is a link to that page.
www.sdthunters.com/mapofalltransmitters.asp
www.sdthunters.com/mapofalltransmitters.asp

thanks
Bill
Replied 25 Jun 2013 07:29:06
25 Jun 2013 07:29:06 Miroslav Zografski replied:
Hello Bill,

first place where you can concatenate two columns is the query to the database :
SELECT CONCAT(dateOfhunt, ' ', nameOfHunt) as huntDetails FROM `schemeName`.`tableName` WHERE ... 

And then use it like :
<%= RecordsetName.Fields.Item("huntDetails").Value %>


If you don't like messing with the query you can concatenate both strings within the Marker Description in the extension:

<%= RecordsetName.Fields.Item("column1Name").Value & " " & RecordsetName.Fields.Item("column2Name").Value %>


Regards.
Replied 26 Jun 2013 17:47:59
26 Jun 2013 17:47:59 Bill Elkerton replied:
Thanks Miroslav, I am using the concatenate and works great except for one thing, how do add a line break. I tried using vbcrlf and <br /> but I can't seem to get it to work. Don't know if you have to use " or & in a certain way. Anyway how do you get a line break?

Thanks again

Bill
Replied 27 Jun 2013 06:54:59
27 Jun 2013 06:54:59 Miroslav Zografski replied:
Hello Bill,

the line break is a string so you need to add it like
& "<br/>" & 

if it is inside the concatenation or edit the concatenation like so:

<%= RecordsetName.Fields.Item("column1Name").Value & "<br/>" & RecordsetName.Fields.Item("column2Name").Value %>


for your information & - joins strings (variables), "" - escapes strings.

Regards.
Replied 27 Jun 2013 22:28:34
27 Jun 2013 22:28:34 Bill Elkerton replied:
Thanks Miroslav, you the man! it works, now I know how to do html with the map extension.
NEW QUESTION
I see that I can select different letter for the markers that are pre-made,
(so cool) how do I sent up an ID for my custom markers and turn on the key function for different markers using recordsets?
Thanks for your help

Bill

Reply to this topic