przezdziecki / geoxml3

Automatically exported from code.google.com/p/geoxml3
0 stars 0 forks source link

kmz branch r123 - sort geo.docs alphabetically by url #107

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.

geo.parse([G, U, L]);

for (var i=0; i < geo.docs.length; i++) { geo.hideDocument(geo.docs[i]); }

var aux;
switch(N){
    case "G":
        aux=geo.docs[0].url;
        window.alert(aux);                     Shows G - Correct!
        geo.showDocument(geo.docs[0]);
        break;
    case "U":
                aux=geo.docs[1].url;
        window.alert(aux);                     Shows L - ¿why?
        geo.showDocument(geo.docs[1]);
        break;
    case "L":
                aux=geo.docs[2].url;
        window.alert                           Shows U - ¿why?
        geo.showDocument(geo.docs[2]);
        break;
        default:
                break; 

What is the expected output? What do you see instead?

    case "G":
        aux=geo.docs[0].url;
        window.alert(aux);                     G

    case "U":
                aux=geo.docs[1].url;
        window.alert(aux);                     Expect U (Second in the array)

    case "L":
                aux=geo.docs[2].url;
        window.alert                           Expect L (Third in the array)

What version of the product are you using? On what operating system?

kmz branch r123

Original issue reported on code.google.com by mateo.la...@gmail.com on 13 Mar 2015 at 2:28

GoogleCodeExporter commented 9 years ago
Additional tests -  This happens on Chrome...Not in Firefox...

Original comment by mateo.la...@gmail.com on 13 Mar 2015 at 3:18

GoogleCodeExporter commented 9 years ago
If it is usefull this is not happening using polys branch r123.

Original comment by mateo.la...@gmail.com on 13 Mar 2015 at 4:55

GoogleCodeExporter commented 9 years ago
What do you mean by "sort geo.docs alphabetically by url" in the title? 
Can you provide a Minimal, Complete, Tested example that displays the issue?

Original comment by geocodezip on 14 Mar 2015 at 10:38

GoogleCodeExporter commented 9 years ago
In the title I mean that the parser changes the order of the docs in the array.

The example goes in the attached files.

They are a little bit different from what I report in the issue but in these 
case I would say:....
...

switch(N){
    case "Gc":.....................
.................................        Shows Gc - Correct!
    case "Uc":....................
.................................        Shows Lc - ¿why?
    case "Lc":
...................................      Shows Uc - ¿why?

Thanks,

Original comment by mateo.la...@gmail.com on 16 Mar 2015 at 3:38

Attachments: