gtt-project/redmine_gtt

Set tracker icon default to empty

sanak opened this issue · 8 comments

sanak commented

Problem
Currently, plugin settings tracker icon default is 1st item (maki-bicycle), but it should be empty (not selected) item.

To Reproduce
Create database from scratch.

Screenshots
default_tracker_icon

sanak commented

Well, this seems not to be fixed in docker-gtt, so I reopen this.

sanak commented

I might patch wrong way about this, so checking history seems to become necessary.
https://github.com/gtt-project/redmine_gtt/commits/main/src/components/gtt-setting.ts

Run

bundle exec rails runner ./setting_gtt.rb

with file setting_gtt.rb for example

  Setting.plugin_redmine_gtt = {
    "tracker_1" => "square", 
    "tracker_2" => "circle", 
    "tracker_3" => "hexagon", 
    "status_1" => "#00ff00", 
    "status_2" => "#ffff00", 
    "status_3" => "#0000ff", 
    "status_4" => "#00ffff", 
    "status_5" => "#ff0000", 
    "status_6" => "#ff00ff", 
    "default_map_center_longitude" => "135.35740", 
    "default_map_center_latitude" => "34.74701", 
    "default_map_zoom_level" => "17", 
    "default_map_maxzoom_level" => "19", 
    "default_map_fit_maxzoom_level" => "17", 
    "editable_geometry_types_on_issue_map" => ["Point","LineString","Polygon"], 
    "default_geocoder_options" => "{}"
  }

For default tile layer add

  GttTileSource.new(
    name: 'OSM', 
    type: 'ol.source.OSM', 
    global: true, 
    default: true, 
    options: {
      "url" => "https://tile.openstreetmap.jp/{z}/{x}/{y}.png", 
      "custom" => "17/34.74701/135.35740", 
      "crossOrigin" => nil, 
      "attributions" => "<a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>"
    }
  ).save
sanak commented

Okay, I will check above, later.
Thanks for advice.

I think this is more or less resolved.

When I add a new tracker, the icons is "empty". On the map it shows the default "home" icon. I think that's OK.

@sanak , could you check, if this is still a problem?

sanak commented

@dkastl Well, I think that this has been already solved, so I close this.