M-Reimer / osm-everywhere

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

POI Markers on maps.google.com

scubbx opened this issue · comments

When using this extension on the Google-Maps page (maps.google.com) and displaying geographical search results, the results themselves are not shown on the map, because they are overlayed by the OSM layer.

Is there a possibility to use OSM as a baselayer but still display the location markers from the search on top of that?

Please always provide direct links for testing and probably a screenshot.

The Add-on should be internally blacklisted on maps.google.com.
https://github.com/M-Reimer/osm-everywhere/blob/master/handlers/google.js#L19-L27
If this does not work, then the blacklist needs fixing. The idea is that the Add-on never changes the "original website" of the map provider. It should only replace external embeds.

An example link is: https://www.google.com/search?client=firefox-b-lm&tbs=lf:1,lf_ui:4&tbm=lcl&sxsrf=ALiCzsa8yNgFD8XKH7NfdkwX2VSp4RoJ1g:1666803771743&q=aida&rflfq=1&num=10&ved=2ahUKEwjI9uX1r_76AhXDQfEDHVmwB9kQtgN6BAgtEAY#rlfi=hd:;si:;mv:[[48.233765999999996,16.4011578],[48.178816,16.2954672]];tbs:lrf:!1m4!1u3!2m2!3m1!1e1!2m1!1e3!3sIAE,lf:1,lf_ui:4

grafik

When opening maps.google.com directly, then the original map is shown. After looking at the link of my search result, I see that the domain is actually not "maps.google.com".
The link provided is the result of a "normal" www.google.com search. So adding an additional
if (origin.host.startsWith("www.google.com"))
would do the trick.

The link provided is the result of a "normal" www.google.com search. So adding an additional
if (origin.host.startsWith("www.google.com"))
would do the trick.

You are right. This should be in there, but with 'startsWith("www.google.")' to cover all the other Google domains.
But I still wonder why it covers markers. Probably my tile replacement kicks in on some requests where it shouldn't. Probably this is the right opportunity to have a deeper look into the parameter syntax used by Google. I guess the same issue could happen on other websites where similar markers are used.