Jump to content

User:Evad37/GeoHack replacement script

From Wikipedia, the free encyclopedia

GeoHack replacement script (source) – Replace coordinates' external links to GeoHack with direct links to a single mapping provider.

Instructions

[edit]

Add the following two lines to your common.js (or skin-specific js):

{{subst:lusc|User:Evad37/GeoHack_replacement_script.js}}
ghrs_mapprovider = "<url>";
  • <url> is the url to load, specifiying the replacement variables above instead of actual values
  • These urls can be found at Template:GeoTemplate
  • For example, Google Maps:

    ghrs_mapprovider = "http://maps.google.com/maps?ll={latdegdec},{londegdec}&spn={span},{span}&q={latdegdec},{londegdec}";

  • or for OpenStreetMap:

    ghrs_mapprovider = "http://www.openstreetmap.org/index.html?mlat={latdegdec}&mlon={londegdec}&zoom={osmzoom}&layers=B000FTF";

See also

[edit]

User:Evad37/Custom GeoHack replacement – alternative script which replaces GeoHack with your own custom page