Events Made Easy Forums Bug fixed or feature request implemented Documentation "true" and "false" Mistakes?

Viewing 16 posts - 1 through 16 (of 16 total)
  • Author
    Posts
  • #42314
    Anonymous
    Inactive

    At http://www.e-dynamics.be/wordpress/:

    “eventful: if set to true, only locations with events planned will be shown. Default: false.”

    Setting eventful=true doesn’t work, but setting eventful=1 does, so it seems that the documentation should be changed to:

    “eventful: if set to 1 only locations with events planned will be shown. Default: 0.”

    Or alternatively the code could be changed to support “true” and “false”.

    #45693
    Franky
    Keymaster

    Fixed in trunk so it should now support true/false (next to 1/0), please do verify.

    But in fact I’m a bit unsure what the best solution is: true/false or 1/0 …

    #45694
    Anonymous
    Inactive

    As a coder I prefer 1/0, but their meanings may not be clear to some users.

    #45695
    Anonymous
    Inactive

    I have entered 33 locations at an EME test website. I am displaying a locations map on a WordPress page by means of this shortcode:

    [locations_map eventful=1 width=900 height=675]

    All 33 locations are listed below the map, but markers for only the first 12 locations display on the map. A popup info-box displays with a pointer to the location if I click any of the 33 locations in the list, but map markers for 21 of the locations never display.

    #45696
    Anonymous
    Inactive

    While attempting to troubleshoot this limitation on my own I discovered that three map markers are obscured behind other markers and that 15 markers are actually being painted on the map. I also found this line of JavaScript code which seems to allow space for only 15 markers:

    var letters = new Array(‘A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’,’M’,’N’,’O’);

    Is there are reason for that particular limit?

    #45697
    Anonymous
    Inactive

    I experimentally expanded the Array() declaration in eme_location_map.js as shown below, which causes markers for all 33 locations to display.

    var letters = new Array(‘A’,’B’,’C’,’D’,’E’,’F’,’G’,’H’,’I’,’J’,’K’,’L’,’M’,’N’,’O’,’P’,’Q’,’R’,’S’,’T’,’U’,’V’,’W’,’X’,’Y’,’Z’,’AA’,’AB’,’AC’,’AD’,’AE’,’AF’,’AG’);

    However, there will be significantly more than 33 locations in my application. Unless there is a consideration that I am not aware of it seems better to have the array automatically grow in size as needed to accommodate the actual number of locations.

    #45698
    Anonymous
    Inactive

    I have read Google Maps Javascript API V3.2 Reference documentation since posting the message above and learned that simply expanding the array size as I did above is not the correct way to display a large number of markers. Even if it was, it would not be as good to have a large number of markers identified with an alphabetic series such as X, Y, Z, AA, AB, AC, etc. as with a numeric integer count.

    #45699
    Franky
    Keymaster

    This discussion should be in a seperate post, but anyway: I build the images for the location markers with these letters:

    var letter = letters;

    customIcon = “http://www.google.com/mapfiles/marker” + letter + “.png”;

    and replacing this by a number doesn’t work. These are the ones given by google:

    http://sites.google.com/site/gmapicons/home/

    So if I want to display more than 26 icons, this requires custom icons then.

    Also: the limit is in fact from the old version, I bumped it to 26 (A-Z) for now in trunk.

    #45700
    Franky
    Keymaster

    I just read up on some stuff, and found that using the Marker Manager might be the way to go:

    http://code.google.com/apis/maps/documentation/javascript/v2/overlays.html

    or to keep things simple: the same marker for every event, and then add/code the ability to add a custom marker for an event

    #45701
    Anonymous
    Inactive

    I agree this discussion should be in a separate thread. My investigation of the problem I was having with some locations not showing on the map grew out of my discovery of the previously resolved “true” and “false” issue which is why I continued with it here.

    I have started a new thread: http://www.e-dynamics.be/bbpress/topic.php?id=332

    #45702
    Franky
    Keymaster

    Btw, did you check/text if 1/0 and true/false now both work?

    #45703
    Anonymous
    Inactive

    I just checked and found that 1 and true display different sets of locations. However, I am not sure that I am using your latest code. I will download from the trunk and re-test.

    #45704
    Anonymous
    Inactive

    I just updated from the trunk and now neither:

    [locations_map eventful=1 width=900 height=675]

    nor:

    [locations_map eventful=true width=900 height=675]

    displays a map. There is nothing but white space in the rectangle where the map should be.

    P.S. I will be gone the next hour or so, but will check back after that to see if you would like me to help troubleshoot.

    #45705
    Franky
    Keymaster

    That might be related to something else. I’ll try here (sometimes I’m just too lazy 🙂 )

    #45706
    Franky
    Keymaster

    Ok, new code in trunk: since I moved the javascript to the footer and only include it when needed, I needed to indicate for the locations_map shortcode that we need the javascript as well.

    For the code: http://plugins.trac.wordpress.org/changeset/326764/events-manager-extended/trunk/eme_locations.php

    Edit: tested also and it works 🙂

    #45707
    Anonymous
    Inactive

    Yes, that works.

Viewing 16 posts - 1 through 16 (of 16 total)
  • The forum ‘Bug fixed or feature request implemented’ is closed to new topics and replies.
Scroll to Top