Group Abstract Group Abstract

Message Boards Message Boards

GeoServer option in GeoListPlot fails with vector error

Posted 1 day ago

Script:

Do[ 
queryresult = RunProcess[
    {
        "bq",
        "query",
        "--format=json",
        "--nouse_legacy_sql",
        "--max_rows=86400",
        "SELECT DISTINCT ST_X(`geography`) AS longitude, ST_Y(`geography`) AS latitude FROM `personalinformatics.locations` WHERE EXTRACT(DATE from `timestamp` AT TIME ZONE 'America/New_York') = '"<>DateString[mapdate,"ISODate"]<>"'"
    },
    "StandardOutput"
];
data = ImportString[queryresult,"RawJSON"];
table = Table[
    GeoPosition[
        {
            ToExpression@data[[i,"latitude"]],
            ToExpression@data[[i,"longitude"]]
        }
    ],
    {i, Length[data]}
];
map = GeoListPlot[
    table,
    ImageSize->{1080,1080},
    GeoServer->"https://tiles.openstreetmap.us/vectiles/`1`/`2`/`3`.pbf",
    GeoScaleBar->{"Imperial","Metric"},
    PlotLabel->Style["Daily GPS Map | " <> DateString[mapdate,"LocaleDateFull"],"Subtitle"]
];
Export["/home/steven/public_html/dailymaps/"<>DateString[mapdate,"ISODate"]<>"_map.png",map];
Print["Completed map export for "<>DateString[mapdate,"ISODate"]];
,{mapdate, DateRange[DateObject[{2026, 4, 27}], DateObject[{2026, 4, 30}]]}]

The following error is returned: GeoServer::styleres: Cannot download vector style resources. I have tried the following URLs for GeoServer and am getting this error (note, there should be backticks around the 1, 2, and 3—this forum composer removes them).

  • <a href="https://tile.openstreetmap.org/`1`/`2`/`3`.pbf">https://tile.openstreetmap.org/`1`/`2`/`3`.pbf (the current OpenStreetMap vector tile URL)
  • <a href="https://tile.openstreetmap.org/`1`/`2`/`3`.png">https://tile.openstreetmap.org/`1`/`2`/`3`.png (the current OpenStreetMap raster tile URL)
POSTED BY: Steven Buehler

I tried this:

GeoListPlot[{Entity["City", {"NewYork", "NewYork", "UnitedStates"}], 
  Entity["City", {"Boston", "Massachusetts", "UnitedStates"}]}, 
 GeoServer -> 
  "https://tiles.openstreetmap.us/vectiles/`1`/`2`/`3`.pbf"]

and I got your same error message (Cannot download vector style resources), but I also got what looks like a fine map, with full vector graphics.

POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard