ThinkGeo.com    |     Documentation    |     Premium Support

About Feature's ToolTip

Hi @Ethan

 I use a  InMemoryFeatureLayer to show some point,These points have different sizes.I want to display the message when the mouse moves to the point.  How can  do that ?

  i use this API to do Collection<Feature> dotNearestFeatures = dotLayer.QueryTools.GetFeaturesNearestTo(worldLoction, mapControl.MapUnit, 1, dotColumnNameLayer, 100000, DistanceUnit.Meter);

 but the 100000 parameter is not determined, So the results are not accurate.

Regards.
ZhangMing

Hi Zhangming,

I think this sample is helpful for your requirement: https://github.com/ThinkGeo/DynamicMarkerOverlaySample-ForWpf

And please don’t set 100000, it’s too big for this function, I guess you just need query nearest points and pick them order by distance, so please reduce the value.

Regards,

Ethan

Hi @Ethan

Thanks 

Regards
ZhangMing

Hi Zhangming,

I am glad to hear that’s helpful.

Regards,

Ethan

Hi @Ethan
Thank you for your strong support.
i use this Api Collection nearestFeatures = mapLayer.FeatureSource.GetFeaturesNearestTo(worldLoction, mapControl.MapUnit, 1, columnNames, 1, DistanceUnit.Meter) to get ShapeFileFeatureLayer feature.

This API is invoked in mouse movement events, But sometimes get this error. The decimal degree longitude value you provided was out of range.  How can I avoid this mistake?

Regards
ZhangMing

Hi ZhangMing,

For Decimal Degree, projection 4326, the longitude should between (-180, 180), the latitude should between (-90, 90).

Please double check your value.

Regards,

Ethan

Hi @Ethan
I’ve solved it. Thanks.

Regards
ZhangMing

Hi Zhangming,

Thanks for your update.

Any question please let us know.

Regards,

Ethan