Closed wivaku closed 6 years ago
Mapper::informationWindow(-1.11111, 11.11111,[
'marker' => true,
'markers' => [
'symbol' => 'circle',
'icon' => /path/to/your/icon.png'',
'autoclose' => true,
'animation' => 'DROP'
]
);
Or
Mapper::map(-1.11111, 11.11111,[
'markers' => [
'symbol' => 'circle',
'icon' => /path/to/your/icon.png'',
'animation' => 'DROP'
],
]);
Do you have a working example? The above does not show a specific marker title or a custom marker for that specific informationWindow. (Plus: it is missing required 3rd argument: informationWindow content)
Hi @wivaku,
The following should work:
Mapper::map(53.3799491,-1.4706869, [
'zoom' => 16,
'center' => true, // true so the zoom will be used
'marker' => false, // don't show marker for this location
'markers' => [
'title' => 'default marker title',
'icon' => 'https://storage.googleapis.com/support-kms-prod/SNP_2752125_en_v0' // red dot
],
]);
Mapper::informationWindow(
53.3799491,-1.4706869,
'town hall',
[
'marker' => true,
'title' => 'marker: town hall',
'icon' => 'https://storage.googleapis.com/support-kms-prod/SNP_2752063_en_v0' // yellow dot
]
);
return view('map');
that's it. great, thanks.
Hi @wivaku,
The following should work:
Mapper::informationWindow( 53.3799491,-1.4706869, 'town hall', [ 'marker' => true, 'title' => 'marker: town hall', 'icon' => 'https://storage.googleapis.com/support-kms-prod/SNP_2752063_en_v0' // yellow dot ] ); return view('map');
@bradcornford, It is possible to set the icon size in the above code?
@ulver2812 Yes, this is possible as follows:
Mapper::informationWindow(
53.3799491,-1.4706869,
'town hall',
[
'marker' => true,
'title' => 'marker: town hall',
'icon' => [
'url' => 'https://storage.googleapis.com/support-kms-prod/SNP_2752063_en_v0',
'scale' => 20
]
);
return view('map');
How do I set the marker details for a specific informationWindow?
The below shows the informationWindow with default marker ('default marker title' with red dot), instead of custom marker details ('marker: town hall' with yellow dot).