Login

Snippets by _ben_

Snippet List

Uk postcode googlemap templetag

Entirely based on and with big thanks to: [http://www.tomanthony.co.uk/](http://www.tomanthony.co.uk/) Drops in a googlemap with a placemarker based on a uk postcode Looks like this: {% googlemap_from_ukpostcode postcode "XxY" zoom %} e.g. {% googlemap_from_ukpostcode "SP27AS" "220x290" 16 %} postcode and zoom can optionally be template variables. "XxY" is the x/y size of the map you want to drop in. zoom can be omitted and defaults to 14. requires: in settings: GOOGLE_AJAX_API_KEY, GOOGLE_MAPS_API_KEY google_map_ukpostcodes.js: is slight variation on js at http://www.tomanthony.co.uk/demo/geocode_uk_postcode/gmap.js For further and better info see: [http://www.tomanthony.co.uk/blog/geocoding-uk-postcodes-with-google-map-api/](http://www.tomanthony.co.uk/blog/geocoding-uk-postcodes-with-google-map-api/)

  • templatetag
  • googlemap
  • postcode
Read More

_ben_ has posted 1 snippet.