Difference between revisions of "Widget:GoogleAreaMap"

From Open Energy Information

(Added Google Maps API key.)
Line 39: Line 39:
<script src="https://maps.googleapis.com/maps/api/js?key= AIzaSyD67u9BDw10Td9a2AAU8CuVelsZMJEOkqg&v=3.exp&sensor=false"></script>
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyD67u9BDw10Td9a2AAU8CuVelsZMJEOkqg&v=3.exp&sensor=false"></script>
<script type="text/javascript">$(function(){  
<script type="text/javascript">$(function(){  
   var map = new google.maps.Map(document.getElementById('google-area-map'), {
   var map = new google.maps.Map(document.getElementById('google-area-map'), {

Latest revision as of 14:51, 8 October 2019

This widget displays a Google Map with the specified area shaded. Currently only supports rectangles.

  • title - The name, word, or phrase you would like to associate with the area.
  • coordsNE - The coordinate pair (lat,lng) of the NE corner of the rectangle.
  • coordsSW - The coordinate pair (lat,lng) of the SW corner of the rectangle.
  • color - The color of the area shading (will be slightly transparent, default:#FF0000).
  • width - The width of the map to display, in px. (default: 500)
  • height - The height of the map to display, in px. (default: 300)

|title=Sample Area
|coordsNE=36.2381, -117.6827
|coordsSW=36.0271, -117.9134