Changeset 026e929 in osmose-frontend


Ignore:
Timestamp:
Mar 1, 2014 11:08:41 AM (6 years ago)
Author:
Frédéric Rodrigo <fred.rodrigo@…>
Branches:
master
Children:
19cf3e4
Parents:
b9e0bad
git-author:
Frédéric Rodrigo <fred.rodrigo@…> (16/02/2014 10:52:04)
git-committer:
Frédéric Rodrigo <fred.rodrigo@…> (01/03/2014 11:08:41)
Message:

Add Nominatim geocoder

Files:
7 added
3 edited

Legend:

Unmodified
Added
Removed
  • static/map/map.js

    r2796266 r026e929  
    3535  map.addControl(scale); 
    3636 
     37  var geocode = L.Control.geocoder({showResultIcons: true}) 
     38  geocode.markGeocode = function(result) { 
     39    this._map.fitBounds(result.bbox); 
     40    return this; 
     41  }; 
     42  map.addControl(geocode); 
     43 
    3744  function getUrlVars() { 
    3845    var vars = [], hash; 
  • static/map/style.css

    rb9e0bad r026e929  
    377377  display: block; 
    378378} 
     379 
     380ul.leaflet-control-geocoder-alternatives { 
     381  width: 60vw; 
     382} 
     383.leaflet-control-geocoder-alternatives a:hover, .leaflet-control-geocoder-selected { 
     384  background-color: inherit; 
     385} 
  • views/map/index.tpl

    r985a882 r026e929  
    88  <link rel="stylesheet" type="text/css" href="{{get_url('static', filename='/map/leaflet/leaflet.css')}}" /> 
    99  <link rel="stylesheet" type="text/css" href="{{get_url('static', filename='/map/leaflet-sidebar/src/L.Control.Sidebar.css')}}"> 
     10  <link rel="stylesheet" type="text/css" href="{{get_url('static', filename='/map/leaflet-control-geocoder/Control.Geocoder.css')}}"> 
    1011  <link rel="stylesheet" type="text/css" href="{{get_url('static', filename='/map/style.css')}}"> 
    1112  <script id="popupTpl" type="text/template" src="{{get_url('static', filename='/tpl/popup.tpl')}}"></script> 
     
    2021  <script type="text/javascript" src="{{get_url('static', filename='/map/layers.js')}}"></script> 
    2122  <script type="text/javascript" src="{{get_url('static', filename='/map/leaflet-sidebar/src/L.Control.Sidebar.js')}}"></script> 
     23  <script type="text/javascript" src="{{get_url('static', filename='/map/leaflet-control-geocoder/Control.Geocoder.js')}}"></script> 
    2224  <script type="text/javascript" src="{{get_url('static', filename='/map/Osmose.Menu.js')}}"></script> 
    2325  <script type="text/javascript" src="{{get_url('static', filename='/map/Osmose.Marker.js')}}"></script> 
Note: See TracChangeset for help on using the changeset viewer.