WordPress.org

Ready to get started?Download WordPress

Forums

Basic Google Maps Placemarks
Filter Placemarks Revisited (80 posts)

  1. DvdVlag
    Member
    Posted 1 year ago #

    I can't get that div that shows the categories to me..
    I'm I doing something wrong?

  2. jesse.t
    Member
    Posted 1 year ago #

    http://pastebin.com/jtQVv4uh

    This is my mapPage.php. I use it to display the map. I may have forgotten something along the lines of my creating this. I guess run a compare and see if that fixes your issues. I have a feeling it has something to do with me stuffing everything in that map div.

  3. DvdVlag
    Member
    Posted 1 year ago #

    I just did what you had on your page, only I'm not getting a menu, the only thing I get is this:

    http://s10.postimage.org/5ztv8dkop/now.png

  4. jesse.t
    Member
    Posted 1 year ago #

    Have you set any categories up in the plugin? The categories are what create the nav. Also, check to make sure you have the latest jquery. That may cause some conflicts as well. Preventing the divs from being created.

    Check to make sure you have a div with the id filteredNav. That is the one that creates the navigation. It is created in the javascript here:

    if ($('#map').length) {
    		$('#map').append("<div id='filteredNav' /><hr /><div id='mapLocs' style='padding-left:30px;' />");
    		$.each($.bgmp.markers, function(index, arr) {
    			$('#filteredNav').append('<button class="fNav shown" value='+$.bgmp.markers[index]+''+'>'+$.bgmp.markers[index]+'</button>');
    		});
    	}
  5. Ian Dunn
    Member
    Plugin Author

    Posted 1 year ago #

    1.9.3-rc2 is now available, which adds the code changes we talked about earlier to support extending the plugin for your custom code.

  6. DvdVlag
    Member
    Posted 1 year ago #

    I found a example of what I meant by the category menu: look at this stuff, I know that it works with "hide (category)" and "show (category)" php code.
    I only have no idea how to program any of this stuff.

    Look at this here: http://econym.org.uk/gmap/example_categories.htm

  7. jesse.t
    Member
    Posted 1 year ago #

    DvdVlag, That's what my changes accomplish. There are 5 files, 2 (core.php and the javascript from the plugin), 2 I added (my javascript file and mapPage.php) and changes I added to function.php (I need to pull them out, but they are fine for now.) After that all you have to do is create a new page change its type to mapPage.php All of this should be posted throughout these 3x posts.

    http://capsoftinc.com/dev/esmm/wordpress/ is the dev page where Ive worked on this. You will have to go to Columbia, SC though to see the filterable results. Again, this is merely a test page. So it looks like crap and could have several bugs.

    Ian, I haven't worked on this project in a while, but when I get back around to it, I'll definitely take a look at merging it with the new RC.

  8. msmithwisedu
    Member
    Posted 1 year ago #

    jesse.t, youre custom code does exactly what I am looking to do. Fantastic work. The problem is, I have no idea how to implement it on my site... the functionality is pretty basic: have a menu that will allow users to show/hide markers based on their category. I read this whole thread as carefully as I could but I still have no idea where to begin. Thanks for any help you can provide.

  9. jesse.t
    Member
    Posted 1 year ago #

    I'm not sure how thorough you read this topic, but the post right above kind of puts the pieces together. If you have no experience in editing php/etc this will be a bit of a pain to put together, but if you really want it and are willing to learn to accomplish it, you should be able to do it.

    Simply put, download all the files Ive attached throughout the post. Should be a core.php, functions.js, test.js and mapPag.php. The core.php & functions.js overwrite the ones in the plugin. Be sure you back up the originals as they might not work with your version of the plugin. (I'm on 1.9RC2 I believe.) Place mapPage.php into your themes root directory and assign the page your map will be that template. I should have pasted some code for my function.php file as well that needs to be added to your themes function.php file. Read about why I did this on the installation FAQ: http://wordpress.org/extend/plugins/basic-google-maps-placemarks/installation/ do_shortcode. It should explain that.

    That should be all thats necessary. I should forewarn that it's an old version and I have found several bugs. I haven't been able to release a new version yet as I'm still working on it and I'm not sure how much work would be required to make it work yet.

  10. msmithwisedu
    Member
    Posted 1 year ago #

    Jessie.t
    Thanks for the clarification. I really appreciate it.
    I have (backed up and) overwritten core.php and functions.php and created mapPage.php in my theme root, and set it as my map page template.

    Am I supposed to use all of your re-written functions.php (including the CUSTOM JAVASCRIPT) as it is, or am I supposed to do something else with that script?

    Also, I can't find any mention of test.js on this thread.

    --

    Right now, it looks like I'm getting close, i just can't ge the category buttons to load

    see: http://bit.ly/10Gax5C

    Again, thanks so much for your work and sharing. Sorry to be a bother.

  11. jesse.t
    Member
    Posted 1 year ago #

    It never fails me how people automatically put an i in my name. I'd make a pretty ugly woman, don't you think? All jokes aside, I apologize: It has been a while since I posted my information: If you look here: http://pastebin.com/n60VidcW. You will see that the pastebin is split into 2 JS's. The later, separated by:

    /************CUSTOM JAVASCRIPT************************/
    /****************************************************/

    Is my test.js. Please paste that into a separate javascript and load it on your site. Let me know the results. I have fixed a lot of issues and will release my latest code if you are capable of getting it working.

  12. msmithwisedu
    Member
    Posted 1 year ago #

    jesse.t
    First, sorry about the name gaff.
    How do I load test.js? I've tried using wp_enqueue_script in the header, template file and in a functionality plugin but I really have no idea if I am doing it right.
    Thanks again

  13. jesse.t
    Member
    Posted 1 year ago #

    The easiest way is to just hard code it into your header, but thats not the best way. enqueue script would probably be ideal. Also, you can name the js file whatever you want. I only named it that as this was more of a concept initially. Just make sure jquery is loaded first. I noticed I had issues with the jquery that wordpress uses, so I ended up pulling Googles. Not sure what kind of issues you may run into with other plugins, but if you have the same issue try adding the following to the bottom of your themes function.php:

    function addjQueryUI() {
    	wp_deregister_script('jquery');
    	wp_deregister_script('jquery-ui-core');
    	wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js',false,'1.8.3',false);
    	wp_register_script('jquery-ui-core','http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js',array('jquery'),'1.9.2',false);
    	wp_enqueue_script('jquery');
        wp_enqueue_script('jquery-ui-core');
        //wp_enqueue_script('jquery-ui-draggable');
    }
    add_action('wp_enqueue_scripts', 'addjQueryUI');
  14. jesse.t
    Member
    Posted 1 year ago #

    msmithwise,
    I am checking to see what you've come up with using my code.. I noticed on your site that you are getting a javascript error.
    TypeError: $ is undefined $.geocoder;

    Try replacing the $ with jQuery and see if that doesn't make things work better for you.

  15. msmithwisedu
    Member
    Posted 1 year ago #

    jesse.t,
    I haven't had a chance to get back to it. we opted to roll the map out as a post-launch feature but as soon as I get through the initial launch of the site I'm diving right back into it. Thanks so much for your help. When I get this working I'll have to paypal you the cost of a beer in your locality.

  16. msmithwisedu
    Member
    Posted 1 year ago #

    jesse.t
    I assumed you meant in test.js
    I did that and have still not managed to get it to work.
    Interested in some small contract work? I just want to get this up and running

  17. mpa4hu
    Member
    Posted 1 year ago #

    excellent job, exactly what I wanted, almost love you.
    gonna test it, and try not to disturb you unless some comet hits my comp.

  18. mpa4hu
    Member
    Posted 1 year ago #

    Hello Jesse,

    First I've read everything you did.
    copy-pasted core.php, main functions.js and created custom js file for the second part.

    now my maps doesnot display anything. I created myPage.php but don't know how to include this.
    The problem is that I cant find what you did in your functions.php (which I guess is located in themes folder right?).
    Is functions.php what I need to edit to display my maps page via myPage.php?

    and Is this all I needed to do?

  19. mpa4hu
    Member
    Posted 1 year ago #

    Edit: I found that I can display it via Map Page Main.
    but it still doesnot shows me map, just search and direction boxes.

  20. mpa4hu
    Member
    Posted 1 year ago #

    okay I found

    function addjQueryUI() {
    	wp_deregister_script('jquery');
    	wp_deregister_script('jquery-ui-core');
    	wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js',false,'1.8.3',false);
    	wp_register_script('jquery-ui-core','http://ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js',array('jquery'),'1.9.2',false);
    	wp_enqueue_script('jquery');
        wp_enqueue_script('jquery-ui-core');
        //wp_enqueue_script('jquery-ui-draggable');
    }
    add_action('wp_enqueue_scripts', 'addjQueryUI');

    for the function.php in my themes and added at the bottom but nothing changes. my guess is that core.php is buggy for this plugin (ver.1.8).

    because, when I include core.php, it doesnot shows my footer. I mean php interpretation stops at some place.
    "<div id="map"> is last what it does in my html source.

  21. jesse.t
    Member
    Posted 1 year ago #

    This was originally written on 1.9RC2 (I believe) so running it with 1.8 might cause some strange bugs. I'd backup the 1.8 since it's stable and grab the RC2 and test it with that. I'd be interested in seeing if you run into the same issues that msmithwise ran into.

  22. jesse.t
    Member
    Posted 1 year ago #

    jesse.t
    I assumed you meant in test.js
    I did that and have still not managed to get it to work.
    Interested in some small contract work? I just want to get this up and running

    Sorry man I missed this. Maybe I can free up some time this afternoon and release the latest updates. I think with what I have up currently its kind of piecemailed together from different versions of me working on it. As of now, we have it running rather well. Admittedly, there are probably some funny bugs in the versions you guys are using.

  23. mpa4hu
    Member
    Posted 1 year ago #

    My bad. I found version 1.9.3RC which works perfect. I mean it displays the map, but where are the categories? how to hide/show them?

  24. jesse.t
    Member
    Posted 1 year ago #

    Hmm, I was on 1.9.2. I know that ian made some changes with 1.9.3 so I cannot promise that it'll work flawlessly. Did you implement my changes or just install 1.9.3? The reason I ask is my work isn't implemented into Ians core, so you will still need to add them manually.

    Assuming you did that, I would suggest the following:

    Make sure your markers are assigned to categories. If they are, my next suggestion would be to run firebug's console in firefox and see if you receive any javascript errors. The way it works is Core.php pulls the categories in and sends them to functions.js which then pushes them into an array. I then take the array and display it in test.js.

  25. jesse.t
    Member
    Posted 1 year ago #

    If you have a recommendation on where I could host the files, I'd be more than happy to upload all my modded files for you to drop in. I'd rather not use my companies ftp.

  26. mpa4hu
    Member
    Posted 1 year ago #

    I did everything with markers and categories. it even shows me my markers on map.
    There are millions of errors
    most of them start like this one.
    Timestamp: 02/22/2013 05:40:50 PM
    Error: TypeError: $ is undefined
    Source File: http://heureka.ge/test/1/gmapscustomfunctions.js
    Line: 1
    ___
    it in my FF Console
    and in my Chrome:
    http://s019.radikal.ru/i610/1302/c4/cf9959a00237.png

    I guess I just continue searching with some suitable plugin

  27. mpa4hu
    Member
    Posted 1 year ago #

    http://www.4shared.com/
    is good i guess
    and it's worth trying dropbox/google drive

  28. jesse.t
    Member
    Posted 1 year ago #

    $ is undefined

    Interesting... Are you loading my js file before or after functions.js/Jquery?

    Jquery should be first, followed by functions.js then finally test.js.

  29. mpa4hu
    Member
    Posted 1 year ago #

    before, tried in both ways

  30. jesse.t
    Member
    Posted 1 year ago #

    That was the same issue that msmithwise had. Let me upload my latest work and see if it does it for you.

    Alternatively, although I doubt it will work you could add $ = jQuery.noConflict(); to the top of test.js, though I think that would remove the $.bgmp variable if you did it that way.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.