From d60e6882a89dcfa6b418d456e8a1642492b4fc42 Mon Sep 17 00:00:00 2001 From: Fabien Bodard Date: Thu, 9 May 2013 21:37:53 +0000 Subject: [PATCH] [GB.MAP] * BUG: Some little corrections * NEW: Add a Max property to ShapeLayer git-svn-id: svn://localhost/gambas/trunk@5652 867c0c6c-44f3-4631-809d-bfa615b0a4ec --- comp/src/gb.map/.src/Shapes/_ShapeItem.class | 4 ++-- comp/src/gb.map/.src/_MapShape.class | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/comp/src/gb.map/.src/Shapes/_ShapeItem.class b/comp/src/gb.map/.src/Shapes/_ShapeItem.class index f72d78981..5204440bb 100644 --- a/comp/src/gb.map/.src/Shapes/_ShapeItem.class +++ b/comp/src/gb.map/.src/Shapes/_ShapeItem.class @@ -12,8 +12,8 @@ Public Image As Image Public Function Contains(hMapPoint As MapPoint) As Boolean - If Bounds.X < hMapPoint.Lon And Bounds.Right > hMapPoint.Lon Then - If Bounds.Y < hMapPoint.Lat And Bounds.Bottom > hMapPoint.Lat Then + If Bounds.Lon < hMapPoint.Lon And Bounds.lon2 > hMapPoint.Lon Then + If Bounds.Lat < hMapPoint.Lat And Bounds.Lat2 > hMapPoint.Lat Then Return True Endif Endif diff --git a/comp/src/gb.map/.src/_MapShape.class b/comp/src/gb.map/.src/_MapShape.class index 60488959e..98e7c7ff5 100644 --- a/comp/src/gb.map/.src/_MapShape.class +++ b/comp/src/gb.map/.src/_MapShape.class @@ -15,6 +15,7 @@ Private $icolor As Integer Private $colIDShape As New Collection Property Read Count As Integer Property Image As Image +Property Read Max As Integer Public Sub _new() @@ -258,3 +259,9 @@ Public Sub Refresh() Next End + +Private Function Max_Read() As Integer + + Return $hShapes.Max + +End