Zoom Maps

ID #1064

16. How to display some data in a popup window when a user moves the mouse over a state?

Open the locator_map.xml in any plain-text editor and find the section of the region you want to display a popup for. Find the <info> section. Type the desired text within this tag as shown below:

...
<state>
  <id>7</id>
  <name>Michigan</name>
  <URL></URL>
  <info>Any text</info> 
  <color>0x7798BA</color>
  <color_>0x0054A6</color_>
  <frame></frame>
  <image></image>
</state>
...

If you need to put in multiple lines of text, simply hit Enter after each line:

...
<info>Multiline text sample
Line 2
Line 3
</info>
...

Additionally, you may display an image in the popup window. Here are the step-by-step:

1. Choose a picture you want to show. The image must be in JPG format, no more than 64x64 pixels.

2. Upload that picture to your website.

3. In the locator_map.xml find the <image> tag and put the URL of the uploaded image there:

 

...
<state>
  <id>7</id>
  <name>Michigan</name>
  <URL></URL>
  <info>Any text</info> 
  <color>0x7798BA</color>
  <color_>0x0054A6</color_>
  <frame></frame>
  <image>photo.jpg</image>
</state>
...

Don’t forget to save the XML and upload it back to your website after any changes you made.

 

...

<state>

  <id>7</id>

  <name>Michigan</name>

  <URL></URL>

  <info>Any text</info>

  <color>0x7798BA</color>

  <color_>0x0054A6</color_>

  <frame></frame>

  <image>photo.jpg</image>

</state>

...

Tags: -

Related entries:

Last update: 2011-05-11 09:16
Author: Fla-shop Team
Revision: 1.0

Digg it! Share on Facebook Print this record Send FAQ to a friend Show this as PDF file
Please rate this FAQ:

Average rating: 0 (0 Votes)

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry