Hitachi Vantara Pentaho Community Forums
Results 1 to 6 of 6

Thread: Map Component: how to show markers in OpenLayers map

  1. #1
    Join Date
    Aug 2017
    Posts
    3

    Question Map Component: how to show markers in OpenLayers map

    I'm creating a CDE dashboard with a map component. I'm having trouble getting the markers to show up. The map is displayed correctly though. I'm using Pentaho 7.1.0.0.12

    The datasource is correct, I'm using this very same datasource in a clone dashboard showing a table instead of the map and rows are displayed. My query:

    Code:
    SELECT report_id AS Id, lat AS Latitude, lon AS Longitude, 0 AS Value, a.name AS Title from REPORTS rp
    INNER JOIN ACTIVITY a ON a.a_id=rp.a_id
    WHERE rp.employee_id=${p_selected_employee} AND rp.date BETWEEN ${p_date_from} AND ${p_date_to}
    This is supposed to work, isn't it? Is there any documentation on the possible columns and data types accepted by the map component? I've seen some people mentioning a possible "icon-url" column? (didn't work for me)


    Now in the map component advanced options, there is a Marker image field of type text that I presume it should contain the URL of the marker image. Not knowing whether this should contain relative URLs or absolute ones, I've tried every possible combination to no avail:
    • marker_blue.png
    • api/repos/pentaho-cdf-dd/resources/custom/amd-components/Map/images/marker_blue.png
    • /pentaho/plugin/pentaho-cdf-dd/api/repos/pentaho-cdf-dd/resources/custom/amd-components/Map/images/marker_blue.png
    • http://myserver:7080/pentaho/plugin/...arker_blue.png

    I also tried leaving it empty.
    I also tried with images available on the internet instead of the ones hosted in pentaho and still no luck.
    I also tried this one which I found on the samples, also not working:
    • js/lib/OpenMap/OpenLayers/img/marker.png


    Any idea of what on Earth should go in this marker field?

    Any help will be appreciated. Thanks in advance.


    DISCLAIMER: I've spent DAYS trying to get this to work. I've read existing posts in this forum, searched the internet for the official docs (which do not exist), read every possibly related file inside the "pentaho-solutions/plugin-samples/pentaho-cdf" folder, tried a lot of things in the CDE editor and memorized the NewMapComponent.js code to no avail. So please no "go read the sample" answer. There are like 3 map samples in my pentaho files but they are probably older versions written in CDF and I have no idea of how to open them in my pentaho server (older versions showed a samples link but no longer).

    I've also read the url Marker not displaying issue which I think its outdated/irrelevant and also I can't make any sense of the columns format.





  2. #2
    Join Date
    Nov 2011
    Posts
    1,229

    Default

    Have you read the related files in pentaho-solutions/plugin-samples/pentaho-cdf-dd ? plugin samples > CDE > CDE Reference > NewMapComponent?

    I'm asking because you only mention the very old samples in pentaho-cdf which actually use another legacy map component.
    Pedro Vale
    --
    CTools Product Development
    http://www.webdetails.pt

  3. #3
    Join Date
    Aug 2017
    Posts
    3

    Default

    Quote Originally Posted by pamval View Post
    Have you read the related files in pentaho-solutions/plugin-samples/pentaho-cdf-dd ? plugin samples > CDE > CDE Reference > NewMapComponent?

    I'm asking because you only mention the very old samples in pentaho-cdf which actually use another legacy map component.
    Yes, I read every file containing the keywords "map" or "marker". I'm now reading the source code in github. Apparently there is a possible "marker" column in the query that the component checks. I'll try to follow that way and leave the marker field in the CDE editor empty.

  4. #4
    Join Date
    Apr 2016
    Posts
    4

    Default

    The order for the coordinates is:

    1º longitude

    2º latitude

    I have some examples with markers. If you need more help tell me.

  5. #5
    Join Date
    Aug 2017
    Posts
    3

    Red face

    Finally I am able to see markers. The datasource had a lot of rows with latitude=0 and longitude=0, which are not displayed for some reason even though they are valid coordinates.

    Now after filtering those rows finally OpenLayers default round markers are shown. I could not get custom markers to work though. The "marker" column in the query never worked, and neither did the marker field in the CDE editor, as explained in my first post. I wonder what kind of URL goes there.

  6. #6

    Default

    Quote Originally Posted by mapDog View Post
    Finally I am able to see markers. The datasource had a lot of rows with latitude=0 and longitude=0, which are not displayed for some reason even though they are valid coordinates.

    Now after filtering those rows finally OpenLayers default round markers are shown. I could not get custom markers to work though. The "marker" column in the query never worked, and neither did the marker field in the CDE editor, as explained in my first post. I wonder what kind of URL goes there.
    Hi,
    I am also using same configuration and by default getting maker as round(sphere) shape with red colour.
    So, how to change the default maker shape?
    How to get or see the value on display shape( I have value column). But not able to see value.
    Please add your comments.
    Thanks,
    Ajay !!

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.