Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Now we need to add a column and populate it with the necessary html to create a link to Google StreetView. The link makes use of a named target so StreetView appears in a new tab rather than leaving the iShare application.

Code Block
languagesql
ALTER TABLE osdata.ords_roadnode ADD COLUMN html text;
UPDATE osdata.ords_roadnode SET html = '<a href="https://www.google.com/maps?cbll=' || round(ST_Y(ST_Transform(wkb_geometry, 4326))::numeric,5)::text || ',' || round(ST_X(ST_Transform(wkb_geometry, 4326))::numeric,5)::text || '&cbp=12,0,0,0,5&layer=c" target=\"_new\">Google StreetView</a>';

...