|
Server : Apache System : Linux cvar2.toservers.com 3.10.0-962.3.2.lve1.5.73.el7.x86_64 #1 SMP Wed Aug 24 21:31:23 UTC 2022 x86_64 User : njnconst ( 1116) PHP Version : 8.4.18 Disable Function : NONE Directory : /usr/lib64/python2.7/site-packages/django/contrib/gis/maps/google/ |
Upload File : |
�
r�\c @ s d d l m Z m Z m Z m Z m Z d d l m Z d d l m Z d d l
m Z d d l m
Z
e
d e f d � � Y� Z e
d e f d � � Y� Z d
e f d � � YZ d e f d
� � YZ e d e f d � � Y� Z d e f d � � YZ d S( i����( t fromstrt Pointt
LineStringt
LinearRingt Polygon( t total_ordering( t mark_safe( t six( t python_2_unicode_compatiblet GEventc B s e Z d Z d � Z d � Z RS( s
A Python wrapper for the Google GEvent object.
Events can be attached to any object derived from GOverlayBase with the
add_event() call.
For more information please see the Google Maps API Reference:
http://code.google.com/apis/maps/documentation/reference.html#GEvent
Example:
from django.shortcuts import render_to_response
from django.contrib.gis.maps.google import GoogleMap, GEvent, GPolyline
def sample_request(request):
polyline = GPolyline('LINESTRING(101 26, 112 26, 102 31)')
event = GEvent('click',
'function() { location.href = "http://www.google.com"}')
polyline.add_event(event)
return render_to_response('mytemplate.html',
{'google' : GoogleMap(polylines=[polyline])})
c C s | | _ | | _ d S( s
Initializes a GEvent object.
Parameters:
event:
string for the event, such as 'click'. The event must be a valid
event for the object in the Google Maps API.
There is no validation of the event type within Django.
action:
string containing a Javascript function, such as
'function() { location.href = "newurl";}'
The string must be a valid Javascript function. Again there is no
validation fo the function within Django.
N( t eventt action( t selfR
R ( ( sI /tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyt __init__! s c C s t d | j | j f � S( s'