Hello
I try to use a marker. It is a png,
See here:
If I add this image with
WebGMaps1.Markers.Add(lat,lon, 'Title', Icon, true, true, true, false, false, 0, icDefault, -1, -1, -1, -1, 'Text');
only the text is shown on the map, but not the icon.
What do I wrong?
Sincerely Peter
Bart
(Bart)
2
Hi,
I have not been able to reproduce this issue.
The example below is working as expected when tested here:
WebGMaps1.Markers.Add(WebGMaps1.MapOptions.DefaultLatitude, WebGMaps1.MapOptions.DefaultLongitude, 'Title', '
http://www.winserion.org/images/001.png', true, true, true, false, false, 0, icDefault, -1, -1, -1, -1, 'Text');
It is very strange.
If I use
WebGMaps1.Markers.Add(lat,lon, 'Title', '
http://www.winserion.org/images/001.png', true, true, true, false, false, 0, icDefault, -1, -1, -1, -1, '');
the icon is shown.
Icon := 'C:\001.png';
if FileExists(Icon) then
begin
WebGMaps1.Markers.Add(lat,lon, 'Title', Icon, true, true, true, false, false, 0, icDefault, -1, -1, -1, -1, '');
then the icon is not visible.
Can you reproduce it?
Sincerely Peter
Bart
(Bart)
4
When using local files as marker image, please make sure to use a forward slash instead of a backslash.
Example:
icon := 'c:/001.png';
WebGMaps1.Markers.Add(lat,lon, 'Title', icon, true, true, true, false, false, 0, icDefault, -1, -1, -1, -1, '');
Bart
(Bart)
5
Note that the next release of TMS VCL WebGMaps will include an improvement to also allow the backslash character in a local image path.
Thank you very much, this solved everything!
Peter