Closed jbiddulph closed 4 years ago
Hi, It look like you have an error in your code. The line starting:
Mapper::markermarker(
It should be:
Mapper::marker(53.381128999999990000, -1.470085000000040000, [ 'title' => 'title', 'icon' => [ 'path' => 'M10.5,0C4.7,0,0,4.7,0,10.5c0,10.2,9.8,19,10.2,19.4c0.1,0.1,0.2,0.1,0.3,0.1s0.2,0,0.3-0.1C11.2,29.5,21,20.7,21,10.5 C21,4.7,16.3,0,10.5,0z M10.5,5c3,0,5.5,2.5,5.5,5.5S13.5,16,10.5,16S5,13.5,5,10.5S7.5,5,10.5,5z', 'fillColor' => '#DD716C', 'fillOpacity' => 1, 'strokeWeight' => 0, 'anchor' => [0, 0], 'origin' => [0, 0], 'size' => [21, 30] ], 'label' => [ 'text' => 'Marker', 'color' => '#B9B9B9', 'fontFamily' => 'Arial', 'fontSize' => '13px', 'fontWeight' => 'bold', ], 'autoClose' => true, 'clickable' => false, 'cursor' => 'default', 'opacity' => 0.5, 'visible' => true, 'zIndex' => 1000, ]); $properties = Property::latest()->limit(10)->where('is_live',1)->get(); $companies = Company::get()->random(4); if (Auth::check()) { $loggedin = true; } else { $loggedin = false; } return view('welcome', compact('properties','companies', 'loggedin')); }
Hello Mr how to change the color of the icon? That is to say go from red to green for exemple
I am just trying to add a marker to my map but I get Call to undefined method markermarker()
public function index() { Mapper::map(50.8319292,-0.3155225, ['zoom' => 12]); Mapper::marker(53.381128999999990000, -1.470085000000040000); Mapper::marker(53.381128999999990000, -1.470085000000040000, ['animation' => 'DROP', 'label' => 'Marker', 'title' => 'Marker', 'draggable' => true]); Mapper::marker(53.381128999999990000, -1.470085000000040000, ['icon' => 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=|FE6256|000000']); Mapper::marker(53.381128999999990000, -1.470085000000040000, ['icon' => ['url' => 'https://chart.googleapis.com/chart?chst=d_map_pin_letter&chld=|FE6256|000000', 'scale' => 100]]); Mapper::map(52.381128999999990000, 0.470085000000040000, ['markers' => ['icon' => ['symbol' => 'CIRCLE', 'scale' => 10], 'animation' => 'DROP', 'label' => 'Marker', 'title' => 'Marker']])->marker(53.381128999999990000, -1.470085000000040000); Mapper::markermarker(53.381128999999990000, -1.470085000000040000, [ 'title' => 'title', 'icon' => [ 'path' => 'M10.5,0C4.7,0,0,4.7,0,10.5c0,10.2,9.8,19,10.2,19.4c0.1,0.1,0.2,0.1,0.3,0.1s0.2,0,0.3-0.1C11.2,29.5,21,20.7,21,10.5 C21,4.7,16.3,0,10.5,0z M10.5,5c3,0,5.5,2.5,5.5,5.5S13.5,16,10.5,16S5,13.5,5,10.5S7.5,5,10.5,5z', 'fillColor' => '#DD716C', 'fillOpacity' => 1, 'strokeWeight' => 0, 'anchor' => [0, 0], 'origin' => [0, 0], 'size' => [21, 30] ], 'label' => [ 'text' => 'Marker', 'color' => '#B9B9B9', 'fontFamily' => 'Arial', 'fontSize' => '13px', 'fontWeight' => 'bold', ], 'autoClose' => true, 'clickable' => false, 'cursor' => 'default', 'opacity' => 0.5, 'visible' => true, 'zIndex' => 1000, ]); $properties = Property::latest()->limit(10)->where('is_live',1)->get(); $companies = Company::get()->random(4); if (Auth::check()) { $loggedin = true; } else { $loggedin = false; } return view('welcome', compact('properties','companies', 'loggedin')); }