User:Schalice/Maps

Description
This extension embeds an iFrame to display a single point GoogleMap within an article. It includes google's geocoding and single point map apis using javascript. It should work inside a tough firewall policy. It does not require a google key.

Installation
This extension requires Extension:Website in iFrame. As a result, it should not be used on a public or anonymous wiki. Copy and save, as "map.php", the following code into the 'root' of your wiki.

Usage

 * map.php



 

var geocoder; var map;

geocoder = new google.maps.Geocoder;

var address =""; geocoder.geocode( { 'address': address}, function(results, status)  {      if (status == google.maps.GeocoderStatus.OK)      {         var myOptions =         {            zoom: ,            disableDefaultUI: true,            center: results[0].geometry.location,            mapTypeId: google.maps.MapTypeId.ROADMAP          }

map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); }    });




 * Example of a calling function