Menu

#470 [4.1.4] Place Hierarchy - googlemap view

closed-accepted
None
5
2008-10-09
2008-04-09
No

using googlemap module for Place Hierarchy

It would really be great if this patch was included in next release!

Discussion

1 2 > >> (Page 1 of 2)
  • KosherJava

    KosherJava - 2008-04-09
    • assigned_to: nobody --> kosherjava
     
  • KosherJava

    KosherJava - 2008-04-09

    Logged In: YES
    user_id=634811
    Originator: NO

    Wooc,
    I checked out your site and it looks great. Can you change the patch so that the map matches the one used in the indi page? This includes having the whel mouse disabled (this affects screen scrolling), uses the default map type used in the indi page (you use terrain), has links below the map for changing types (you use the default Google Maps buttons, but for I18N we need the ability to set this from the language files). Also, does the code deal with flag files that are not present?
    Thanks

     
  • KosherJava

    KosherJava - 2008-04-09

    Logged In: YES
    user_id=634811
    Originator: NO

    Going to http://wilenscy.ovh.org/placelist.php?action=show&parent\[0]=Polska&parent[1]=Mazowieckie&parent[2]=Siedlce&level=3

    generates an error:

    <br />ERROR 8: Undefined variable: levelo<br />
    0 Error occurred on line <b>512</b> of file <b>placelist.php</b><br />
    <span class="error"><b>ERROR:-1 DB Error: unknown error <br />SQL:</b>1 ** SELECT DISTINCT pl_id,pl_place,pl_lati,pl_long,pl_zoom,pl_icon FROM pgv_placelocation INNER JOIN pgv_places ON pgv_placelocation.pl_place=pgv_places.p_place AND pgv_placelocation.pl_level=pgv_places.p_level WHERE pl_parent_id= ORDER BY pl_place [nativecode=sqlite_query() [<a href='function.sqlite-query?PHPSESSID=vc0mfvr26oo0g0lblnvpr8kn66'>function.sqlite-query</a>]: near &quot;ORDER&quot;: syntax error]</span><br /><br />
    <br />
    <b>Fatal error</b>: Call to undefined method DB_Error::fetchRow() in <b>/home/w/i/l/wilenscy/www/placelist.php</b> on line <b>47</b><br />

     
  • Anonymous

    Anonymous - 2008-04-09

    Logged In: YES
    user_id=1910459
    Originator: NO

    I've put it on my site now. Overall it works great. Just a couple of things:
    1 - You might want to add an "if gm module exists' type statement so this file can function as the standard one if the site doesn't have the GM module included (sorry if that is there and I missed it)
    2 - on my site if I go from England down to the county of Kent, which as 260 places listed there is no map at all. I would expect it might load slowly, as gogglemap doesn't like large numbers of markers, but don't see why there is no map at all. Any ideas? My guess, looking at the source code on the page, is that I have a couple of places with no coordinates. It might be useful to trap these and ignore them, so the map still displays.
    3 - I don't see the error KJ mentions, so perhaps you have fixed that, or could it be browser specific?
    4 - On KJs other suggestions:
    a) - wheel-mouse - I actually prefer to keep it. Its also there in the pedigree_map patch I submitted. Perhaps it should be optional somehow though.
    b) - using map settings from the INDI page - not sure. I actually prefer a smaller map (500x350) for the heirarchy, but the default type would be OK.
    c) adding some of the 'below the map' options would be good - type, place edit, etc.

     
  • KosherJava

    KosherJava - 2008-04-10

    Logged In: YES
    user_id=634811
    Originator: NO

    One thing that should be done once this is stable is to have all the Google Map code moved into the Google Maps module directory, and just include if present.

     
  • KosherJava

    KosherJava - 2008-04-10

    Logged In: YES
    user_id=634811
    Originator: NO

    The error is easy to trigger, but is hidden in IE and you have to do a View Source to see it. Go to any individual, and from the map tab, click on the on the place that links back to the placelist. It will generate the error.

     
  • Anonymous

    Anonymous - 2008-04-10

    Logged In: YES
    user_id=1910459
    Originator: NO

    Ah yes, I see now. Also, on my IE7 in Vista, the map doesn't display then either. It works fine for the same place if you work down through the heirarchy (from placelist) but not when linking from anywhere else (not just from the Map tab). There's a considerable difference in the url generated in each case:

    From INDI http://wilenscy.ovh.org/placelist.php?action=show&parent\[0]=Polska&parent[1]=Mazowieckie&parent[2]=Siedlce&level=3

    From LIST http://wilenscy.ovh.org/placelist.php?action=find&levelm=21&level=3&parent\[0]=Polska&parent[1]=Mazowieckie&parent[2]=Siedlce

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    Thanks
    This error was already fixed.
    Added configuration of googlemap module below the map.

    Next things I'll try to do in future.

    File Added: placelist.zip

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    kiwi - I left out your post, so I didn't know that you tried to use googlemap for place hierarchy

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    File Added: placelist.zip

     
  • Anonymous

    Anonymous - 2008-04-10

    Logged In: YES
    user_id=1910459
    Originator: NO

    <<so I didn't know that you tried to use googlemap for place hierarchy>> - don't worry. You've achieved what I couldn't, so I'm very pleased.

    I have checked further, and I was right about my 'Kent' problem. The map does not display if any lat/long are null. You just need to wrap
    if (($place2['lati'] != NULL) && ($place2['long'] != NULL)) { }
    round the 'echo...' statements in the map script (two sets)

    It still leaves an odd display if there are places with coordinates of 0,0 (which will happen sometimes if you import places from GEDCOM into googlemap locations) - but they serve as a reminder to fix the coordinates so i would leave those.

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    - fix problem with no lati, long coordinates - with kiwi_pgv suggestions
    - using the default map type
    - using the default map size
    - if googlemap module not exist use standard view
    File Added: placelist.zip

     
  • Łukasz Wileński

    placelist.php ver0.3

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    kosherjava, could help me with flags?
    I don't know how to include this as markers

     
  • KosherJava

    KosherJava - 2008-04-10

    Logged In: YES
    user_id=634811
    Originator: NO

    I changed the summary to reflect that this patch is against 4.1.4. As for the flags, I have no idea, but noticed that on your site the flags showed in the info window. On my site I do not upload flags, So I was asking if your code handles that. I was not suggesting that they be used as markers, since that would be confusing. I would also suggest that if "Display Map Co-ordinates" is set to yes, this should show in the info window. Also in the info window, you just show one level an example being Międzyrzec Podlaski. I think that you should display "Międzyrzec Podlaski, pow. bialski, Lubelskie, Polska" as is done on the individual page map.

     
  • KosherJava

    KosherJava - 2008-04-10
    • summary: Place Hierarchy - googlemap view --> [4.1.4] Place Hierarchy - googlemap view
     
  • Łukasz Wileński

    placelist.php ver0.4

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    - display map coordinates if enabled
    - display full place name
    - fixed problem with Undefined index

    kiwi_pgv - check your 'Kent' problem

    File Added: placelist0.4.zip

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    - fixed problem with Undefined index if place have only 1 level
    - fixed problem with coordinates, previosly displayed everytime, now if enabled

    File Added: placelist0.5.zip

     
  • Łukasz Wileński

    placelist.php ver0.5

     
  • Anonymous

    Anonymous - 2008-04-10

    Logged In: YES
    user_id=1910459
    Originator: NO

    My 'Kent' problem is nor fixed, thanks.

    I have a new problem I'm afraid though. You can see it on my site (http://www.our-families.info/famtree/placelist.php)
    Click on 'England', then 'Kent' (be patient, there are a lot of markers), then 'Bromley'.

    It displays a marker for Bromley, Shropshire, England - not Bromley, Kent England. Both exist in my database. The marker actually says "Bromley, Bromley, Kent, England N52.82, W2.89" - which is more strange. Those coordinates are the Shropshire ones.

    Perhaps something not quite right in the code?

     
  • KosherJava

    KosherJava - 2008-04-10

    Logged In: YES
    user_id=634811
    Originator: NO

    What is still left on your TODO list besides some bug fixes and moving the code out of the placelist and into the Google Map module code?
    Once it gets stable (lets give it a few weeks) I will add it to SVN.

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    I'll try to move the code into google map module directory.
    I also try to fix some bugs in the code.
    If the place have 0,0 or not set coordinates it's a good idea to display marker in up-level place coordinates and remind that this place have wrong coordinates? What do you think?
    If you have any ideas about this patch please comment.

     
  • Łukasz Wileński

    placelist.php ver0.6

     
  • Łukasz Wileński

    Logged In: YES
    user_id=1946672
    Originator: YES

    I moved code into the google map module (created new file - placehierarchy.php)
    and fixed some bugs.

    File Added: placelist0.6.zip

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.