Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get torque map marker with relative path #740

Open
DSpada opened this issue Dec 14, 2022 · 2 comments
Open

Can't get torque map marker with relative path #740

DSpada opened this issue Dec 14, 2022 · 2 comments

Comments

@DSpada
Copy link

DSpada commented Dec 14, 2022

Hi,

I have a windshaft service and I need to get torque map but the marker based on a relative path doesn't works.
In the root folder I have a images folder whit some images.

{
"type": "torque",
"options": {
"cartocss_version": "2.0.0",
"sql": "SELECT geometry FROM mytable",
"cartocss":"
Map
{
-torque-frame-count:1;
-torque-animation-duration:10;
-torque-time-attribute:'total_count';
-torque-aggregation-function:'sum(total_count)';
-torque-resolution:2;
-torque-data-aggregation:linear
}
#table_2_point
{
image-filters:colorize-alpha(blue,cyan,lightgreen,yellow,orange,red);
marker-file:url('./images/torque_marker.png');
marker-width: 4;
marker-fill-opacity: 0.3*[value];
[zoom > 6]
{
marker-width: 6;
marker-fill-opacity: 0.4*[value];
}
[zoom > 7]
{
marker-width: 9;
marker-fill-opacity: 0.4*[value];
}
}
"
}
}

I alway get the error: Couldn't get marker-file ./images/torque_marker.png

Thanks,
Daniele

@padawannn
Copy link

The marker-file must be a valid URL, for example, https://s3.amazonaws.com/com.cartodb.users-assets.production/maki-icons/circle-stroked-18.svg

@DSpada
Copy link
Author

DSpada commented Dec 15, 2022

But with mapnik type, relative path works fine:

{ 
        "type": "mapnik",
        "options":
        {
          "cartocss_version": "2.0.0",
          "sql": "SELECT geometry FROM mytable2",
          "cartocss": "#MyMapnikMap
          {
            ::main
            {
              marker-file: url('./images/myMapnikMarker.png');    
              marker-width: 6;            
              marker-fill:#00B050;
              marker-allow-overlap: true;   
              marker-line-opacity: 0; 
        
              [zoom<20]  {marker-width: 4;} 
              [themevalue = 38] {marker-fill:#F44611;}
              [themevalue = 39] {marker-fill:#FFFF00;}
              [themevalue = 40] {marker-fill:#00B050;}
              [themevalue = 41] {marker-fill:#7030A0;}
              [themevalue = 42] {marker-fill:#FF0000;}
              [themevalue = 43] {marker-fill:#FFFF00;}
            }

          }"
        }
      }

if one works why doesn't the other work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants