What can we do to make it easier to design with Wild Apricot?

Plot Your Members on a Map [Experimental]

Original experiment has been removed. The code was outdated and is no longer useful.

0 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    Frank shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    24 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • BCHDA commented  ·   ·  Flag as inappropriate

        Cool. I'm not an expert, but I can see that your map setup on imclubs.org for example is quite a bit more complex than the old code here, having a second website with php code, etc. It works very well though, and you have a warning on the page that it may be slow, but it is super fast for me.

        I'm not so concerned with the speed. I'll have probably 25 locations to map at the most.

      • BCHDA commented  ·   ·  Flag as inappropriate

        DotCreativity messaged me with some links to other sites he's set up. http://cctdirectory.co.uk/directory
        http://petprofessionalguild.com/PetGuildMembers
        http://gaylesta.org/locate-a-therapist
        http://napochicago.com/proximity_search

        DotCreativity, would you consider sharing a basic version of your code and instructions how to set it up with us? I already saw your ad for your services...can't afford it unfortunately. Maybe something that would work for <50 locations or something?

      • BCHDA commented  ·   ·  Flag as inappropriate

        [quote user="francoispainchaud"]complicated really but it's okay. Thanks[/quote]

        Not sure what you mean. Do you have a working example?

      • BCHDA commented  ·   ·  Flag as inappropriate

        Is anyone using code like this now? That works with the latest version of WildApricot and Google Maps API v3 (or whatever compatibility mode is left for v2 code)

        Something doesn't seem to work anymore. The code makes a map display, but no markers are shown. The javascript console in Chrome only gives a couple warnings related to migrating code to v3.

        Maybe something has changed in the xml code that the script has to parse? Anyone still have a working example, or could help?

        Eg, I'm trying to map some locations on https://bchda.wildapricot.org/teachers and the script is getting the info from: http://bchda.wildapricot.org/content/Members/MemberDirectory/MemberDirectoryWebService.asmx/LoadMembers?memberDirectoryPageId=7746

      • pollockk commented  ·   ·  Flag as inappropriate

        Got it working - but only for subset of our 2000 members. any suggestions on how to get entire database loaded?

        thanks...

      • pollockk commented  ·   ·  Flag as inappropriate

        Frank - thanks for posting this code.

        i have created a hidden page on my site with a 2 column table i cut and pasted from excel with name in the first col and a postal code in the second column.

        i have a hidden page in our members only section with your html code in it. i have my google id in and a page id (i could not find the page id on source code of my hidden directory page - i had to get the page id from the frame source with the directory table in it).

        on my hidden, members only page, i can see the map but no markers show up.

        Any suggestions?

        Kim

      • Snowy Apricot commented  ·   ·  Flag as inappropriate

        I just wanted to show these two functions to use second and third fields in a column. You can use them in the same way as function getColumnValue:

        function getColumnValue1(member, column)
        {
        if (!member[column] || !member[column][1] || !member[column][1].v)
        {
        return '';
        }

        return member[column][1].v;
        }

        function getColumnValue2(member, column)
        {
        if (!member[column] || !member[column][2] || !member[column][2].v)
        {
        return '';
        }

        return member[column][2].v;
        }

        (As mentioned above, getColumnValue get value of first field of column.)

      • Dmitry Buterin commented  ·   ·  Flag as inappropriate

        Hi there, my colleague Vanya managed to find some time and look into this, here's his reply, I hope this helps you to move forward!===== "...[in the sample code above] the method getColumnValue returns only first value from column, but user can actually setup up to 3 fields in one column. In this particular case they selected Postal code for the first field and Province for second. So Google was only using the postal code. I added two new functions to their Javsacript code [on page http://www.personalchefscooperative.com/google-maps-test ]: getColumnValue1 and getColumnValue2 and redefinded var address likevar address = getColumnValue(member, 'c3') + ' ' + getColumnValue1(member, 'c3') + ' ' + getColumnValue2(member, 'c3'); (see method placeMarker)This site doesn't use third field in this column - but they can set it up to display City. This would make the search more precise.Another question was about MemberID. They can use for this value column 4 and define new var memberId = getColumnValue(member, 'c4') and use it in the popup window (tootip for point). They can set this column to have width 1% and it will not be shown on the list of members.
        And one last point. In method placeMarker they define var services = getColumnValue(member, 'c2');They don't use it currently, but if they decide to use it, they should be aware of that currently column 2 is used for Logo. And services are in bottom row (c5)." ======I hope this helps - if you are able to debug it, I would appreciate if you could share your final code and comments on this thread.

      • Frank commented  ·   ·  Flag as inappropriate

        Unfortunately these customizations are provided mostly 'as-is' so we don't modify/expand to beyond what is originally posted. That being said, I do understand your thinking and this is something that will become easier and supported once we introduce an official API for access to membership data (see http://forums.wildapricot.com/forums/308920-archive/suggestions/8831320-api-to-read-contact-member-records-2469 )

      • kchayka commented  ·   ·  Flag as inappropriate

        OK, I think I'm getting this now, though I'm not sure how to "fix" it yet.

        I made the assumption that the "address" Frank mentioned in the code sample consisted of the fields in the 2nd column, concatenated. That was a false assumption. The code as supplied only uses the first field in that column to plot the marker. I would like to use the concatenated address fields (city, state, zip) so the marker plots the member's location, but show a different field from the directory in the pop-up, along with a link to the member's profile page.

        I guess I have to figure out how to do that now. The map from the other working example will surely help, but I do have questions on extracting particular bits of info from the directory db.

        For example, if I have 3 fields in column 3 (c3), what is the syntax for getting the 2nd field value? What is the syntax for the "bottom row" value? How can I directly request the "Postal Code" value, regardless of what column or row it is in? The answers to these questions will help me get this map working the way I'd like.

        Thanks for your assistance on this

      • kchayka commented  ·   ·  Flag as inappropriate

        Directory PageID = 981231
        Map Page located at: http://www.associationofdeansanddirectors.com/membermap

        I think these may be incorrect. The PageID is the number on the <body> tag. View the HTML source of the member directory page, it shows:
        <body id="PAGEID_509041"...> so I think PageID should be 509041

        Maybe that will fix your problem, though it doesn't help mine.

        Can anyone tell me why not all of the markers are placed on my map? 126 members and I'm lucky if a dozen markers are placed. http://www.personalchefscooperative.com/google-maps-test

      • Joshua Barron commented  ·   ·  Flag as inappropriate

        I'm having the same problem ... when I asked Dimitri about it, the chief apricot told me to post here. Can/would you take a look?

        From: Wild Apricot Support [mailto:support@wildapricot.com]
        Sent: Monday, March 28, 2011 8:55 AM
        To: Barron, Joshua
        Subject: [184-151DD16C-E1FF] Google Maps API

        Joshua, I would suggest to post this to the forum.

        Cheers,

        Denys
        Wild Apricot: Member Management Magic http://wildapricot.com
        Web software for small associations and non-profits

        From: joshua.barron@ttu.edu
        Sent: Sat, 26 Mar 2011 16:35:15 -0400
        To: Technical Support
        Subject: Google Maps API

        followed these instructions precisely, but still just get "loading …"
        Directory PageID = 981231
        Map Page located at: http://www.associationofdeansanddirectors.com/membermap

        What am I doing wrong?

      • kchayka commented  ·   ·  Flag as inappropriate

        I'm getting some very inconsistent results with this. The map shows up OK but only some points are plotted. I can't figure out why some do and some don't. Maybe you can see something.

        http://www.personalchefscooperative.com/google-maps-test

        I added the address fields (city, state, postal code) in the 3rd column (hidden on the directory list page via CSS) and changed the JavaScript accordingly. All members should have that info in their account.

        directory page ID=960647

        Something else is I'd like the map marker popup to include a link to the individual member's profile page. I tried adding a link to the <h3> element in the pop-up but it just caused a JS error for 'no element' or something like that. The link should be <a href="http://www.personalchefscooperative.com/Content/Members/MemberPublicProfile.aspx?pageId=960647&memberId=###">

        Where do I get the value for ###?

        If we can get these 2 things worked out, especially not showing all the markers, then this will be a great addition to the site.

        thanks

      • Eileen Nelson commented  ·   ·  Flag as inappropriate

        Well, I finally got the map to show on http://wisconsinflowergrowers.wildapricot.org . However I'm confused about how it ties in to the member directory - I know i've put some names in but can't figure out how to find them back and then how to connect it. I'll keep working when I have more time.

        Thanks for whatever quick suggestions you can give me.

        So far I am liking everything I see.

      • Eileen Nelson commented  ·   ·  Flag as inappropriate

        I have tried doing this several times, including putting in my own API number - but my page just comes back with the Loading block and doesn't show a map.

        I'm a bit confused about exactly what I have to change in terms of the code including the API number. I understand about the rest of the parameters.

        Could you please take a look at my site and give me some feedback.

        Thanks. http://wisconsinflowergrowers.wildapricot.org

      ← Previous 1

      Feedback and Knowledge Base