                 @map_markers().addLayer marker
                 marker.unit = unit
                 unit.marker = marker
-                marker.on 'click', (event) =>
-                    marker = event.target
-                    @service_sidebar.show_details marker.unit
-                    @details_marker?.closePopup()
-                    popup.addTo @get_map()
-                    $(@details_marker?._popup._wrapper).removeClass 'selected'
-                    @details_marker = marker
-                    $(@details_marker?._popup._wrapper).addClass 'selected'
+                @listenTo marker, 'click', @select_marker
                 marker.on 'mouseover', (event) ->
                     event.target.openPopup()
+
+        select_marker: (event) ->
+            marker = event.target
+            @service_sidebar.show_details marker.unit
+            @highlight_selected_marker marker
+
+        highlight_selected_marker: (marker) ->
+            @details_marker?.closePopup()
+            popup = marker.getPopup()
+            popup.setLatLng marker.getLatLng()
+            popup.addTo @get_map()
+            $(@details_marker?._popup._wrapper).removeClass 'selected'
+            @details_marker = marker
+            $(@details_marker?._popup._wrapper).addClass 'selected'
 
         draw_units: (unit_list, opts) ->
             unit_list.each (unit) =>
                 @draw_unit unit
-            if opts? and opts.zoom
-                @refit_bounds()
+            if opts?
+                if opts.zoom
+                    @refit_bounds()
+                if opts.select_unit
+                    console.log unit_list.first()
+                    @highlight_selected_marker unit_list.first().marker
 
         refit_bounds: ->
             map = @get_map()

        tagName: 'li'
        events:
            'click': 'select_result'
        template: 'search-result'
        initialize: (opts) ->
            @parent = opts.parent

                success: =>
                    @details_view.render()
            if opts.draw_marker
                opts.select_unit = true
                unit_list = new models.UnitList [unit]
                @parent.draw_units unit_list, opts

