Page 1 of 1

AV when setting an xy value on TMapSeries

Posted: Thu Oct 10, 2013 4:58 pm
by 16463754
The following code generates an exception. I'm, sure I'm just missing something simple:

FMapSeries.ValuesList.Clear;
FMapSeries.AddXY(aLatitude, aLongitude);

The exception is:

exception class : EAccessViolation
exception message : Access violation at address 00BAA479 in module 'Brooches.exe'. Read of address 00000004.

main thread ($1384):
00baa479 +03d Brooches.exe FMXTee.Series.Surface TCustom3DPaletteSeries.GetValueColor
00bbb007 +07b Brooches.exe FMXTee.Series.Map TTeePolygon.Draw
00bbb6bb +033 Brooches.exe FMXTee.Series.Map TMapSeries.DrawValue
00b64a1f +063 Brooches.exe FMXTee.Engine DoDrawIndex
00b64d27 +207 Brooches.exe FMXTee.Engine TChartSeries.DrawAllValues
00bbca2b +39b Brooches.exe FMXTee.Series.Map TMapSeries.DrawAllValues
00b6b989 +071 Brooches.exe FMXTee.Engine ClipRegionCreate
00b6c0b3 +3cf Brooches.exe FMXTee.Engine DrawSeries
00b6c175 +045 Brooches.exe FMXTee.Engine DoDraw
00b6c280 +088 Brooches.exe FMXTee.Engine DrawAllSeries
00b6c335 +059 Brooches.exe FMXTee.Engine TCustomAxisPanel.DrawAxesSeries
00b6b7b4 +1c8 Brooches.exe FMXTee.Engine TCustomAxisPanel.InternalDraw
00b8bc41 +005 Brooches.exe FMXTee.Chart TCustomChart.InternalDraw

Re: AV when setting an xy value on TMapSeries

Posted: Fri Oct 11, 2013 11:55 am
by yeray
Hi,

I don't get any error with this simple example:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
begin
  with Chart1.AddSeries(TMapSeries) as TMapSeries do
  begin
    FillSampleValues;
    Clear;
    AddXY(10, 20);
  end;
end;
But, anyway, this isn't the proper way to populate this series type. Note the Add* methods are inherited from its parents but, the MapSeries works with Shapes.
Here it is an example showing how to populate it.

Re: AV when setting an xy value on TMapSeries

Posted: Fri Oct 11, 2013 1:17 pm
by 16463754
Thanks, I am just trying to add a point for a location.

This is strange that it seems to be a problem with the colour.

Re: AV when setting an xy value on TMapSeries

Posted: Fri Oct 11, 2013 2:03 pm
by yeray
Hi,

Have you tried to use a TPointSeries to mark a point into a TMapSeries?