https://t.me/AnonymousX5
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/lib64/python2.7/site-packages/django/contrib/gis/maps/google/overlays.pyc
�
r�\c@sddlmZmZmZmZmZddlmZddlm	Z	ddl
mZddlm
Z
e
defd��Y�Ze
defd	��Y�Zd
efd��YZdefd
��YZedefd��Y�Zdefd��YZdS(i����(tfromstrtPointt
LineStringt
LinearRingtPolygon(ttotal_ordering(t	mark_safe(tsix(tpython_2_unicode_compatibletGEventcBs eZdZd�Zd�ZRS(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])})
    cCs||_||_dS(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(teventtaction(tselfR
R((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyt__init__!s	cCstd|j|jf�S(s'Returns the parameter part of a GEvent.s"%s", %s(RR
R(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyt__str__5s(t__name__t
__module__t__doc__R
R(((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR	s	tGOverlayBasecBs,eZd�Zd�Zd�Zd�ZRS(cCs
g|_dS(N(tevents(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR
;scCs4ddjg|D]\}}d||f^q�S(sJGenerates a JavaScript array of GLatLng objects for the given coordinates.s[%s]t,snew GLatLng(%s,%s)(tjoin(Rtcoordstxty((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pytlatlng_from_coords>scCs|jj|�dS(s(Attaches a GEvent to the overlay object.N(Rtappend(RR
((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyt	add_eventBscCstd|jj|jf�S(s5The string representation is the JavaScript API call.s%s(%s)(Rt	__class__Rt	js_params(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyRFs(RRR
RRR(((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR9s			tGPolygoncBs5eZdZdddddd�Zed��ZRS(s�
    A Python wrapper for the Google GPolygon object.  For more information
    please see the Google Maps API Reference:
     http://code.google.com/apis/maps/documentation/reference.html#GPolygon
    s#0000ffiig�������?cCs�t|tj�r!t|�}nt|ttf�rEt|�}nt|t�sctd��n|j|_|j	|j
j�|_||||_
|_|_|||_|_tt|�j�dS(s�
        The GPolygon object initializes on a GEOS Polygon or a parameter that
        may be instantiated into GEOS Polygon.  Please note that this will not
        depict a Polygon's internal rings.

        Keyword Options:

          stroke_color:
            The color of the polygon outline. Defaults to '#0000ff' (blue).

          stroke_weight:
            The width of the polygon outline, in pixels.  Defaults to 2.

          stroke_opacity:
            The opacity of the polygon outline, between 0 and 1.  Defaults to 1.

          fill_color:
            The color of the polygon fill.  Defaults to '#0000ff' (blue).

          fill_opacity:
            The opacity of the polygon fill.  Defaults to 0.4.
        s.GPolygon may only initialize on GEOS Polygons.N(t
isinstanceRtstring_typesRttupletlistRt	TypeErrortenvelopeRtshellRtpointststroke_colortstroke_opacityt
stroke_weightt
fill_colortfill_opacitytsuperRR
(RtpolyR'R)R(R*R+((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR
PscCs,d|j|j|j|j|j|jfS(Ns%s, "%s", %s, %s, "%s", %s(R&R'R)R(R*R+(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR~s(RRRR
tpropertyR(((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyRJs	,t	GPolylinecBs/eZdZdddd�Zed��ZRS(s�
    A Python wrapper for the Google GPolyline object.  For more information
    please see the Google Maps API Reference:
     http://code.google.com/apis/maps/documentation/reference.html#GPolyline
    s#0000ffiicCs�t|tj�r!t|�}nt|ttf�rEt|�}nt|ttf�rr|j	|j
�|_n6t|t�r�|j	|jj
�|_nt
d��|j|_||||_|_|_tt|�j�dS(s
        The GPolyline object may be initialized on GEOS LineStirng, LinearRing,
        and Polygon objects (internal rings not supported) or a parameter that
        may instantiated into one of the above geometries.

        Keyword Options:

          color:
            The color to use for the polyline.  Defaults to '#0000ff' (blue).

          weight:
            The width of the polyline, in pixels.  Defaults to 2.

          opacity:
            The opacity of the polyline, between 0 and 1.  Defaults to 1.
        sXGPolyline may only initialize on GEOS LineString, LinearRing, and/or Polygon geometries.N(RRR RR!R"RRRRRtlatlngsR%R#R$tcolortweighttopacityR,R/R
(RtgeomR1R2R3((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR
�scCs d|j|j|j|jfS(Ns%s, "%s", %s, %s(R0R1R2R3(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR�s(RRRR
R.R(((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR/�s!tGIconcBsDeZdZddddddd�Zd�Zd�Zd�ZRS(s�
    Creates a GIcon object to pass into a Gmarker object.

    The keyword arguments map to instance attributes of the same name. These,
    in turn, correspond to a subset of the attributes of the official GIcon
    javascript object:

    http://code.google.com/apis/maps/documentation/reference.html#GIcon

    Because a Google map often uses several different icons, a name field has
    been added to the required arguments.

    Required Arguments:
        varname:
            A string which will become the basis for the js variable name of
            the marker, for this reason, your code should assign a unique
            name for each GIcon you instantiate, otherwise there will be
            name space collisions in your javascript.

    Keyword Options:
        image:
            The url of the image to be used as the icon on the map defaults
            to 'G_DEFAULT_ICON'

        iconsize:
            a tuple representing the pixel size of the foreground (not the
            shadow) image of the icon, in the format: (width, height) ex.:

            GIcon('fast_food',
                  image="/media/icon/star.png",
                  iconsize=(15,10))

            Would indicate your custom icon was 15px wide and 10px height.

        shadow:
            the url of the image of the icon's shadow

        shadowsize:
            a tuple representing the pixel size of the shadow image, format is
            the same as ``iconsize``

        iconanchor:
            a tuple representing the pixel coordinate relative to the top left
            corner of the icon image at which this icon is anchored to the map.
            In (x, y) format.  x increases to the right in the Google Maps
            coordinate system and y increases downwards in the Google Maps
            coordinate system.)

        infowindowanchor:
            The pixel coordinate relative to the top left corner of the icon
            image at which the info window is anchored to this icon.

    cCsC||_||_||_||_||_||_||_dS(N(tvarnametimageticonsizetshadowt
shadowsizet
iconanchortinfowindowanchor(RR6R7R8R9R:R;R<((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR
�s						cCs|j|jkS(N(R6(Rtother((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyt__eq__�scCs|j|jkS(N(R6(RR=((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyt__lt__�scCst|j�t|j�AS(N(thashRR6(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyt__hash__�sN(RRRtNoneR
R>R?RA(((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR5�s6				tGMarkercBsAeZdZdedd�Zd�Zd�Zed��Z	RS(s�
    A Python wrapper for the Google GMarker object.  For more information
    please see the Google Maps API Reference:
     http://code.google.com/apis/maps/documentation/reference.html#GMarker

    Example:

      from django.shortcuts import render_to_response
      from django.contrib.gis.maps.google.overlays import GMarker, GEvent

      def sample_request(request):
          marker = GMarker('POINT(101 26)')
          event = GEvent('click',
                         'function() { location.href = "http://www.google.com"}')
          marker.add_event(event)
          return render_to_response('mytemplate.html',
                 {'google' : GoogleMap(markers=[marker])})
    cCs�t|tj�r!t|�}nt|ttf�rEt|�}nt|t�rl|j|j�|_	nt
d��|j|_||_||_
||_tt|�j�dS(s�
        The GMarker object may initialize on GEOS Points or a parameter
        that may be instantiated into a GEOS point.  Keyword options map to
        GMarkerOptions -- so far only the title option is supported.

        Keyword Options:
         title:
           Title option for GMarker, will be displayed as a tooltip.

         draggable:
           Draggable option for GMarker, disabled by default.
        s3GMarker may only initialize on GEOS Point geometry.N(RRR RR!R"RRRtlatlngR#R$ttitlet	draggableticonR,RCR
(RR4RERFRG((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR
s			cCsd|d|dfS(Nsnew GLatLng(%s,%s)ii((RR((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR+scCssg}|jr&|jd|j�n|jrI|jd|jj�n|jrb|jd�nddj|�S(Nstitle: "%s"sicon: %ssdraggable: trues{%s}R(RERRGR6RFR(Rtresult((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pytoptions.s			cCsd|j|j�fS(Ns%s, %s(RDRI(R((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyR5sN(
RRRRBtFalseR
RRIR.R(((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyRC�s
		N(tdjango.contrib.gis.geosRRRRRtdjango.utils.functionalRtdjango.utils.safestringRtdjango.utilsRtdjango.utils.encodingRtobjectR	RRR/R5RC(((sI/tmp/pip-install-XxeQeY/django/django/contrib/gis/maps/google/overlays.pyt<module>s(09,L

https://t.me/AnonymousX5 - 2025