1
/* -*- Mode: JS2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- */
2
/* vim: set et ts=4 sw=4: */
4
* Copyright (c) 2014 Damián Nohales
6
* GNOME Maps is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by the
8
* Free Software Foundation; either version 2 of the License, or (at your
9
* option) any later version.
11
* GNOME Maps is distributed in the hope that it will be useful, but
12
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
16
* You should have received a copy of the GNU General Public License along
17
* with GNOME Maps; if not, write to the Free Software Foundation,
18
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
* Author: Damián Nohales <damiannohales@gmail.com>
23
const Lang = imports.lang;
25
const MapMarker = imports.mapMarker;
26
const Path = imports.path;
27
const SearchResultBubble = imports.searchResultBubble;
28
const Utils = imports.utils;
30
const SearchResultMarker = new Lang.Class({
31
Name: 'SearchResultMarker',
32
Extends: MapMarker.MapMarker,
34
_init: function(params) {
37
this.add_actor(Utils.CreateActorFromIconName('maps-pin'));
41
return { x: Math.floor(this.width / 2),
45
_createBubble: function() {
46
if (this.place.name) {
47
return new SearchResultBubble.SearchResultBubble({ place: this.place,
48
mapView: this._mapView });