
    Dh                     X    S SK Jr  S SKJr  S SKJr  S SKJr  S SKJ	r	   " S S\\5      r
g)	    )Optional)MacroElement)
JSCSSMixin)Template)remove_emptyc                   z   ^  \ rS rSrSr\" S5      rS/rS/rSSSS	S
0 4S\	S\
S\	S\\   S\
S\4U 4S jjjrSrU =r$ )Geocoder
   a   A simple geocoder for Leaflet that by default uses OSM/Nominatim.

Please respect the Nominatim usage policy:
https://operations.osmfoundation.org/policies/nominatim/

Parameters
----------
collapsed: bool, default False
    If True, collapses the search box unless hovered/clicked.
position: str, default 'topright'
    Choose from 'topleft', 'topright', 'bottomleft' or 'bottomright'.
add_marker: bool, default True
    If True, adds a marker on the found location.
zoom: int, default 11, optional
    Set zoom level used for displaying the geocode result, note that this only has an effect when add_marker is set to False. Set this to None to preserve the current map zoom level.
provider: str, default 'nominatim'
    Defaults to "nominatim", see https://github.com/perliedman/leaflet-control-geocoder/tree/2.4.0/src/geocoders for other built-in providers.
provider_options: dict, default {}
    For use with specific providers that may require api keys or other parameters.

For all options see https://github.com/perliedman/leaflet-control-geocoder

a  
        {% macro script(this, kwargs) %}

            var geocoderOpts_{{ this.get_name() }} = {{ this.options|tojavascript }};

            // note: geocoder name should start with lowercase
            var geocoderName_{{ this.get_name() }} = geocoderOpts_{{ this.get_name() }}["provider"];

            var customGeocoder_{{ this.get_name() }} = L.Control.Geocoder[ geocoderName_{{ this.get_name() }} ](
                geocoderOpts_{{ this.get_name() }}['providerOptions']
            );
            geocoderOpts_{{ this.get_name() }}["geocoder"] = customGeocoder_{{ this.get_name() }};

            L.Control.geocoder(
                geocoderOpts_{{ this.get_name() }}
            ).on('markgeocode', function(e) {
                var zoom = geocoderOpts_{{ this.get_name() }}['zoom'] || {{ this._parent.get_name() }}.getZoom();
                {{ this._parent.get_name() }}.setView(e.geocode.center, zoom);
            }).addTo({{ this._parent.get_name() }});

        {% endmacro %}
    )zControl.Geocoder.jszChttps://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js)zControl.Geocoder.csszDhttps://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.cssFtoprightT   	nominatim	collapsedposition
add_markerzoomproviderprovider_optionsc           
      ^   > [         TU ]  5         SU l        [        SUUUUUUS.UD6U l        g )Nr	   )r   r   default_mark_geocoder   r   r    )super__init___namer   options)	selfr   r   r   r   r   r   kwargs	__class__s	           jC:\Users\julio\OneDrive\Documentos\Trabajo\Ideas Frescas\venv\Lib\site-packages\folium/plugins/geocoder.pyr   Geocoder.__init__I   sD     	
# 
!+-
 
    )r   r   )__name__
__module____qualname____firstlineno____doc__r   	_template
default_jsdefault_cssboolstrr   intdictr   __static_attributes____classcell__)r   s   @r   r	   r	   
   s    0 	I4	
J	
K  " #!#

 
 	

 sm
 
 
 
r    r	   N)typingr   branca.elementr   folium.elementsr   folium.templater   folium.utilitiesr   r	   r   r    r   <module>r4      s$     ' & $ )S
z< S
r    