Did you know ... | Search Documentation: |
Pack weblog -- prolog/info/maps/google/gmap.pl |
A (for now) rudimentary google maps component.
This code provided to weblog by Cliopatria project Licensed under LGPL
Do not call this directly, call it through geo_map and
bind provider(google)
(or do nothing, google is the default)
Generator is an arity n term that corresponds to an arity n+1 predicate.
gmap//1 will repeatedly query Generator for information and build up the map. The final argument may be
id(-ID)
The map div id and javascript variable name will be set to
this. default lmap or gmap depending on provider. must be valid
javascript identifier as atom.zoom(Zoom)
The zoom level. Provider specific how this maps to a
viewport. Default 14center(Lat, Long)
center map view here. defaults to average of
pointspoint(-Lat, -Long)
A marker will be placed at this pointicon_for(+point(Lat, Long), -IconName)
icon to use for this point.
default is provider default iconpopup_for(-HTML, +point(Lat, Long))
termerized HTML to put in popuptooltip_for(+point(Lat, Long), -ToolTipText)
contents of tooltipmaptype(-Type)
only meaningful for google maps, is the constant for
google.maps.MapTypeId (one of 'HYBRID', 'ROADMAP', 'SATELLITE', 'TERRAIN')Defining icon types means binding an icon/3 for each type, then binding all the properties
icon(-Name, -ImageSource, -ShadowSource)
Defines an icon type name.Defining an icon requires that the following be defined for each icon type name:
icon_size(+Name, X, Y)
size of icon imageshadow_size(+Name, X, Y)
size of shadow imageicon_anchor(+Name, X, Y)
offset from UL of image to the point
touching the spot on the mapshadow_anchor(+Name, X, Y)
offset
from UL of shadow image to the point touching the spot on mappopup_anchor(+Name, X, Y)
offset from the point touching map to
where the popup appears (so, eg, Y coord is often negative)