Jump to content
We've recently updated our Privacy Statement, available here ×

Can Visualize.js display Map component (Google Map)


hozawa
Go to solution Solved by marianol,

Recommended Posts

I can display charts with Visualize.js but when I select a report with a Map, the Map component is not displaying even though other elements in the report is being displayed.

Furthermore, the map component is showing when I view the report in Repository.

Does Visualize.js support displaying maps?

I'm currently using JasperReports Server 5.6.0.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Yes it does, the thing is that Visualize will not autoload the Google Maps API, you will need to load it in your page. Somehting like this:

      <script src="http://localhost:8080/jasperserver-pro/client/visualize.js"></script><script src="https://maps.googleapis.com/maps/api/js"></script><script> var mapReport = '/public/Samples/MyMapReport';var MyReport;visualize({    auth: {        name: "jasperadmin",        password: "jasperadmin"    }}, function (v) {        myreport = v.report({             resource: mapReport,             container: "#container",            params: {                 "startMonth": [ 1 ],                "endMonth" : [ 12 ]            }    });[/code]

 

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