Good morning, Thank you for such attention to my problem. I appreciate it. I'll try to answer you all
Hello, Ian I've already solved this problem, not tracing the mouse, for it slows the work a lot and demands many refreshes. I checked it using VB, but problems with CovertCoord are stayed unsolved. It just doesn't returns any data at all >Hi Katrin,>I don't know if you have solved your problem. I have a written a>function >in HAHTSite that may be of some help.> ' Create the search point. > bRC = >CreateMapPoint(oPoint)> oPoint.Set dblMapX, dblMapY> brc = >GetMapZoom(dblMapZoom)> dblMapZoom = dblMapZoom / 100> 'Search Layers> For Each >Layer In g_objMapX.Layers> Set oFound = >Layer.SearchWithinDistance(oPoint,>dblMapZoom , miUnitMeter, 1)> If >oFound.Count = 0 then> Set oFound = >Layer.SearchAtPoint(oPoint)> End If > >'Anything Found> If oFound.Count > 0 then> > 'Insert Code here for finding the>nearest node> >'.....> End If> Next 'Layer>I know this isn't exactly what you want, >but hopefull it give you some>ideas. We use it to guess where people are trying to >click. The code you have sent would be usefull if this function could work. But when using mousemove event I get screen coordinates, in toolused event I get right coordinates, but it's late - the user already clicked. SO at the end I propose to a user to correct his polyline by snapping to shown nodes. It's the best way out I've found. >The 'SnapToNodeSupport' is a MapX 5 Property, but I don't know about>MapX 4.5. No, in MapX 4.5 it was not realized >Have you checked things like CoordSys, data types, etc. Yepp checked - no results :) >Hope this helps. Yes, at least morally :) Thanks >Hi Katrin, >Are you sure the variables you use in PowerBuilder are single's, not double's ? >>ConvertCoord uses singles for some unknown reason. >Using double precision variables will result in giving some useless values. >I usually use the Variant version, ConvertCoordV (in VB), but I don't know >whether >Variant's are available in PB. Hi, Lars! In PB there's no such type as single - real or double, that's are the only floating data types. I've tried to use them all. What's the difference between ConvertCoord and ConvertCoordV - I didn't catch an idea. But it doesn't work also. >Katrin,>There is a piece of sample code somewhere in Mapx help which determines >a>"snap resolution" in Earth units, using ConvertCoords. This would also>provide you >with a useful test for the use of this function.>The code below is written in >Progress. Some languages insist on>qualification of sub arguments as to whether the >argument is input, >output>or both. This could be an issue as there is no declaration >available >for>this to be compiler checked. (In Progress, there is no error reported >>if I>leave the OUTPUT off).Hello Philip! I've already saw analogic code, but for VB. PB doesn't use any sort of input/output parameters. This parameter is unknown for it. Simply it after using this function - convertCoord values of my variables are left untouched. Looks like a bug, as my variables are sent by value, not by reference. Best Regards, Katerinka --------------------------------- Do you Yahoo!? Free Pop-Up Blocker - Get it now
