jeffreykemp / jk64-plugin-reportmap

Report Google Map APEX Plugin
https://jeffreykemp.github.io/jk64-plugin-reportmap/
MIT License
42 stars 16 forks source link

The Apex 5.0.3 version of the plugin errors when using 3 columns for heatmaps #94

Closed Code4SAFrankie closed 4 years ago

Code4SAFrankie commented 4 years ago

Describe the bug The Apex 5.0.3 version of the plugin gives the error Wrong number of columns selected in the SQL query when using 3 columns for the Heatmap. The Help description states that the minimum number of columns is 4, but show the heatmap example having 3 columns.

To Reproduce Steps to reproduce the behavior:

  1. Add the map plugin as a region
  2. Set the static id to mymap
  3. Set Attributes Visualisation to Heatmap
  4. Set the map SQL Query to
    select latitude  lat, 
       longitude lng,
       liid weight
    from   my_coordinates
  5. See error
Region → Static Heat Map → Source → SQL Query
Wrong number of columns selected in the SQL query. See Help of attribute for details.

Expected behavior For the heatmap to support the query with 3 columns as per the example given.

Screenshots If applicable, add screenshots to help explain your problem. Don't know how to add screenshot using github

Device (please complete the following information):

Plugin Version: 1.1 BACKPORT
APEX Version: 5.1.2.00.09
Oracle Database Version: 11g
Browser: Firefox 75.0
OS: Windows 10
Type: desktop

Plugin Attributes Run the page in Debug mode, copy the attributes from the console log here.

I can't run the page due to the error not letting me.

Additional context Add any other context about the problem here, such as SQL query used, and sample data scripts.

SQL query used:

select latitude  lat, 
       longitude lng,
       liid weight
from   my_coordinates
Code4SAFrankie commented 4 years ago

Works fine in non-backport version though, although the weight seems to have no effect except for making the circle disappear when going over 1. The default size for Dissipating off is also very large (several suburbs) for a single point. Would be nice to be able to scale the radius using some mechanism.

jeffreykemp commented 4 years ago

Thanks. I've checked in a fixed version of the 5.0.3 backport script into the master branch (not in a release yet though). https://github.com/jeffreykemp/jk64-plugin-reportmap/blob/master/backport/region_type_plugin_com_jk64_report_google_map_r1_503.sql

With regard to the weight, I've found that the heatmap only really works well when there are a large number of points, with a wide range of weights. I've had dramatic results by using the EXP(n) function instead of just the raw data; this tends to exaggerate the difference between low and high weights which helps the heatmap to highlight areas of high volume/interest.

Code4SAFrankie commented 4 years ago

Works great thanks! And thanks for this awesome plugin which is hopefully going to save me from reading 3000 pages of Oracle Spatial documentation - which might even kill me.