Answer the question
In order to leave comments, you need to log in
Sort geodata by distance. mysql, php or js?
about 10 thousand markers are displayed on the map. under the map, a list of the nearest should be displayed.
tried adding at fetch level mysql SELECT glength(LineString(GeomFromText(astext(PointFromWKB(POINT(63.424818,10.402457)))),GeomFromText(astext(PointFromWKB(POINT(663.422238,10.398996)))))))*100 stackoverflow .com/questions/11436396/mysql-spatial... but it takes a long time.
what can you advise?
nothing else comes to mind except after receiving the data, run this distance calculation at the js level and display this list after the calculations are over, i.e. after 20-30 seconds the
markers are grouped into a cluster. maybe you can somehow get the distance to the first marker in the cluster?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question