nobleo / rviz_satellite

Display internet satellite imagery in RViz
Apache License 2.0
545 stars 231 forks source link

Add support for tileserver APIs taking latitude and longitude values instead of tile coordinates #107

Closed ndunkelivi closed 1 year ago

ndunkelivi commented 1 year ago

Tile Servers like Googles Static Map API require a pair of latitude and longitude values instead of x-y tile coordinates. Therefore, it is now supported to use {lat} and {lon} as placeholders in the tileserver URL. These will be automatically replaced by rviz_satellite according to the center coordinate of each tile when making HTTP requests.

peci1 commented 1 year ago

Please, also update the regex and error message at https://github.com/nobleo/rviz_satellite/blob/78227f6f4e5d8fd913a00c65858b5f4ec0c9a5a0/src/aerialmap_display.cpp#L291-L293 .

The correct regex is R"(.*\{([xyz]|lat|lon)\}.*)".

ndunkelivi commented 1 year ago

Thank you for the review and improvements. I applied and tested your suggested code changes and it works as well.