Hitachi Vantara Pentaho Community Forums
Results 1 to 12 of 12

Thread: Map Component - url Markers - Pentaho Bi pentaho-server-ce-7.1.0.0-12

  1. #1
    Join Date
    Jul 2016
    Posts
    18

    Default Map Component - url Markers - Pentaho Bi pentaho-server-ce-7.1.0.0-12

    Hello guys,

    I'm having some issues with using markers with Map component.
    I had this working in pentaho 6 and now that i'm migrating to 7 I'm having some issues with this.

    So in new version I have the same configuration that i had in 6.

    I'm using a transformation to provide the data with the following format:

    Longitude, Latitude, Description, popupContents, marker

    Markers url are as follow:
    cast('/pentaho/plugin/pentaho-cdf-dd/api/resources/system/workwisePentaho/static/custom/img/blue_marker.png' as text)
    cast('/pentaho/plugin/pentaho-cdf-dd/api/resources/system/workwisePentaho/static/custom/img/red_marker.png' as text)

    I've tested the link itself and the image is showing up if i put it in the browser.

    I have no idea why this isnt working in the new version.

    Any input would be glad.

    Thanks!!

  2. #2
    Join Date
    Jan 2014
    Posts
    189

    Default

    What isn't working exactly?
    Is the map showing but not the markers?
    Can you post a sample dashboard so that others can try to reproduce it?
    Can you please post any web console logs with errors that you might be having?

  3. #3
    Join Date
    Jul 2016
    Posts
    18

    Default

    Yeah the only issue is with the image of the markers.I'm using two images one for Water and one for Wastewater.

    In version 6: Name:  BI version 6.jpg
Views: 481
Size:  28.1 KB

    In version 7: Name:  BI version 7.jpg
Views: 476
Size:  22.9 KB

    I'm using App Builder in version 7, with datasource kettle.
    I dont have any error in Web console.

    I've created a sample to test just the map with App builder.
    https://drive.google.com/open?id=0B0...TA2Rk1EUi10OGM

    Quote Originally Posted by crusso View Post
    What isn't working exactly?
    Is the map showing but not the markers?
    Can you post a sample dashboard so that others can try to reproduce it?
    Can you please post any web console logs with errors that you might be having?

  4. #4
    Join Date
    Jan 2014
    Posts
    189

    Default

    Try putting the following in preExecution

    Code:
    function(){
      this.markerImageGetter = "urlMarker";
    }

  5. #5
    Join Date
    Jul 2016
    Posts
    18

    Default

    I've experimented with this, but i only get these markers not the ones I wanted from data. I need to be able to use the marker icons that are located at /pentaho/plugin/pentaho-cdf-dd/api/resources/system/workwisePentaho/static/custom/img/blue_marker.png.

    I can reach this image by http://localhost:8080/pentaho/plugin...lue_marker.png in my localhost.

    Name:  BI_7_markerImageGetter.jpg
Views: 429
Size:  25.2 KB

    Quote Originally Posted by crusso View Post
    Try putting the following in preExecution

    Code:
    function(){
      this.markerImageGetter = "urlMarker";
    }
    Last edited by Erdnusse; 06-28-2017 at 12:52 PM.

  6. #6
    Join Date
    Jan 2014
    Posts
    189

    Default

    Hmm.
    What if you rename the 5th column "marker" to "icon-url" ?

  7. #7
    Join Date
    Jan 2014
    Posts
    189

    Default

    Ok, after actually looking at the code, you might have found a regression.

    To work around that, define your own addIn.
    Take a look at https://gist.github.com/carlosrusso/...bda4678f716406
    Add the file "urlMarker2.js" as an external javascript resource of your dashboard and paste the snippet under preExecution.js to the preExecution callback of your instance of NewMapComponent.

    Let me know how it went, I did not bother to test the code.

  8. #8
    Join Date
    Jul 2016
    Posts
    18

    Default

    Hey crusso,

    Perfect =), you are missing a "s" in your code, setAddInOption got an error and corrected it to setAddInOptions.

    Name:  Working.jpg
Views: 418
Size:  24.5 KB


    Thank you very much!!!

  9. #9
    Join Date
    Jan 2014
    Posts
    189

    Default

    Good to know that you got it working!
    Now, could you please report a bug in Pentaho's bug tracker under the project "Community Dashboard Editor (CDE)" http://jira.pentaho.com/browse/CDE ?

    The screenshots you sent would be helpful to illustrate what should be happening but isn't.
    If you upload a sample dashboard with some dummy data, it may increase the priority on the bug.

  10. #10
    Join Date
    Jul 2016
    Posts
    18

    Default

    I'm trying but cant figure out where to post the screenshots.

  11. #11
    Join Date
    Jul 2016
    Posts
    18

    Default

    Found it , never mind :d

  12. #12
    Join Date
    Jul 2016
    Posts
    18

    Default

    Issue created: http://jira.pentaho.com/browse/CDE-914

    Thanks mate!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.