Jump to content
Changes to the Jaspersoft community edition download ×

Map Pro implementation


al881

Recommended Posts

Has anyone successfully implemented the Map Pro component?

I can't seem to get any type of recognition out of it. 

I have gone through all of the documentation, including an advanced tutorial. doesn't seem to be doing any good.

I went back to the "standard" Map component (looks like a Google one) but you can't assign a separate dataset to the component like you can with the Pro version.

Anyone know of any good demo's using the Map Pro component?

 

Thanks

 

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 

After reading about the pro version, you have to match up the countries with a numeric system.

Example: 004 = Belize, as an example. You could hard code the values if you want but.....

 

Since i don't have the data in the DB to match that type of requirement I abandoned the Pro and used the

Google one.

 

The Google one, which is not as automated as you like via a GUI; must be hand edited in the XML source tab.

There is only one document I found that showed the values and that is here:

 

http://jasperreports.sourceforge.net/sample.reference/map/index.html

 

Just drop the XML nodes

c:item inside of the c:markerData node.

 

there are 4 items,

 

The latitude and longitude come from my database.

 

You can populate the title and inforwindow with anything. (when you click the location, the infowindow pops up.

When you hover your mouse, the title pops up.

 

Here are examples:

$F{entityname}+"nSales Volume:"+$V{DBAVolumeTotal}+"nQty:"+$F{qty}

 

"<p style=text-align:right;'></p><pstyle='text-align:left;'><b>"+$F{entityname}+"</b><br/>Sales Volume: <b>"+$V{DBAVolumeTotal}+"</b><br/>Qty: <b>"+$F{qty}+"</b><br/>Address: <b>"+$F{address}+"</b><br/>City: <b>"+$F{city}+"</b></p>

 

 

 

You can replace the infowindow with

 

When you click, you can launch another report.

 

 

You will find in the document "ireport-ultimate-guide.pdf" (even though I don't use iReport, a comment that says):

 

 

"Using dynamic entities is not simple because ID Expression must return a valid entity ID for the map you have chosen. In order to do so, you must have the map’s entity codes directly in your database and make them appear in the chosen dataset, or you must write a helper class to determine the ID from the geographic name as it appears in your dataset."

 

In this document is where you will find all of the best info for a pro map.

 

Regards

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...