jesse.t
Forum Replies Created
-
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedForum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedThanks for the kind words, but aside from the fact that my works is completely dependent on Ian’s work, that wouldn’t be right. Secondly, I’ve seen the kind of headache it would cause trying to support a plugin. It’s not worth it to me. All that aside, when I have to revisit this project I’ll probably take the time to fix the $ bug if nobody else has.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedSorry. I got the email about this Saturday morning and forgot to reply. Selected was only used for my CSS I believe. Clicking the actual button with the id’s is what shows/hides markers. I use ShowMarkers() to show all current markers. ShowMarkers() looks for a button with the class shown and gravs it’s value to display visible markers.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedWell I think my answer should be 2 fold. I use the show/hideMarkers() function in my code to hide them, but I check to see if they are within the current visible bounds:
[code]
hideMarkers();
bounds = $.bgmp.map.getBounds();
//show only the markers that should be visible
showMarkers();
[/code]The bounds is what is visible on the viewport of your map. everything outside of that is hidden.
[code]
google.maps.event.addListener($.bgmp.map, 'bounds_changed', function () {
bounds = $.bgmp.map.getBounds();
window.setTimeout(function() {
html = "";
showMarkers();
}, 300);
});
[/code]All of this is listed in my javascript for you to look at with some documentation as to where I found the solutions (Google API links and stackoverflow were great while learning this.)
Now the second part is that if you’re site is going to be flooded with markers, you may need to use the clustering option that Ian added. I haven’t came back to this project in a while, but I may look to see how that works with my current code. To be honest, if you’re familiar enough with javascript the Google API will be great on helping you walk through everything. Like I said before the only barrier with my current code is mapping the $ variable without causing conflict. If you can access the bgmp variable with a noConflict then it’s golden.
Feel free to use anything from my work needed. I only wish it worked out of the box, but I don’t really have time to troubleshoot it properly.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedI’m not sure what version you are using, but I never merged this code with 1.9RC3 (I believe that’s the versioning) Everything I wrote was with RC2, anyways, as mentioned previously, there is an issue with the use of the $ jquery shortcut which will break most installations. I built off a barebones installation with no plugins, so I did not run into the problem. Unfortunately, I haven’t had the time to revisit this and see if I could come up with a work around. The short answer I would think would be to change all instances of $ to jQuery or some other noConflict variable but I haven’t had a chance to test that out. I believe this would have to be done within the plugins jQuery file as well as the one I written so that the bgmp variable carries over. Again, I have not tested this, so I cannot guarantee that would be a fix, but I think it’s a good starting point.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedI apologize for not getting back to this sooner. I guess I no longer get notifications, while I haven’t had time to sit down and look at this issue, I believe the $ not being assigned properly has everything to do with this tidbit I just found looking at some other wordpress functions:
jQuery noConflict Wrappers
The jQuery library included with WordPress is set to the noConflict() mode (see wp-includes/js/jquery/jquery.js). This is to prevent compatibility problems with other JavaScript libraries that WordPress can link.In the noConflict() mode, the global $ shortcut for jQuery is not available, so you can still use:
jQuery(document).ready(function(){ jQuery(#somefunction) ... });
but the following will either throw an error, or use the $ shortcut as assigned by other library.
$(document).ready(function(){ $(#somefunction) ... });
However, if you really like the short $ instead of jQuery, you can use the following wrapper around your code:
jQuery(document).ready(function($) { // Inside of this function, $() will work as an alias for jQuery() // and other libraries also using $ will not be accessible under this shortcut });
That wrapper will cause your code to be executed when the DOM is fully constructed. If, for some reason, you want your code to execute immediately instead of waiting for the DOM ready event, then you can use this wrapper method instead:
I can not guarantee that changing $ to jQuery will fix this issue, but if you’re still fighting with this, it may be worth a shot. (The issue I can see is bgmp is assigned to $ and I’m not sure jQuery.bgmp will return the proper object. Maybe Ian can shed some light on this.
TL;DR: The issue is that if you’re using other jQuery libraries, it breaks the code because of WordPress’s use of noConflict.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedI really need to merge this with 1.9.3…
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks Revisitedhttps://www.4shared.com/archive/oIyqAUv0/forked.html?
Install a fresh 1.9.2RC and try to follow the instructions in this file. Let me know what happens.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedThat 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.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks Revisited$ 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.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedIf 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.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedHmm, 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.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks Revisitedjesse.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 runningSorry 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.
Forum: Plugins
In reply to: [Basic Google Maps Placemarks] Filter Placemarks RevisitedThis 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.
Forum: Hacks
In reply to: calling filters via ajax/bump? After searching for what seemed like forever on Google, I was able to confirm my suspicions that filters will not function if called via Ajax. It’s kind of sad as that could remove some weird restrictions.
This leads me to another question, since filters are set across the board, how would one go about doing stuff such as, When this button is clicked, save filename whatever_the_user_uploads.pdf to very_specific_name.pdf, any other time, save other files as normal?
It seems the Media Upload Box (Pre 3.5) is extremely limited on functions.