Category map of all entries/posts
How do I put a map on a category page that displays the locations of all the entries in the category?
2 people have this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
The best answer from the company
-
The geopress_map function has some nice functionality for being embeddeable in Archive, Category, and Search pages. Right now the function signature is a little long, but if you want to have all your markers for a category or search show up in the map, you use the following in your template (assuming you want your map to be (200px high, 400px wide) in the appropriate template for your blog:
<?php echo geopress_map(200, 400, -1, true, true); ?>
I’m confident
The company says
this answers the question
-
Inappropriate?The geopress_map function has some nice functionality for being embeddeable in Archive, Category, and Search pages. Right now the function signature is a little long, but if you want to have all your markers for a category or search show up in the map, you use the following in your template (assuming you want your map to be (200px high, 400px wide) in the appropriate template for your blog:
<?php echo geopress_map(200, 400, -1, true, true); ?>
I’m confident
The company says
this answers the question
-
Inappropriate?Worked like a charm. Thanks.
Is there any other documentation on the template tags and any other variables? Is there an option to pull additional text into the Google 'bubbles'
I’m thankful
-
Inappropriate?If you look at the "Documentation" tab in the GeoPress section of your WordPress admin there is full docs for all template tags, Post body tags, and howtos.
Currently there isn't a way to customize the styling of the Marker Bubbles. This is something that would be a great addition and we're getting feedback and ideas on.
What would you like to see? -
Hi AJ, I tried this, but am not getting the right results. For whatever reason, I only get one marker, with a bubble that shows multiple stories. Am I doing something wrong?
http://dailynewarker.com/category/crime/ -
Inappropriate?Is it safe to assume that this same template functionality would also work for all posts bearing a particular tag (as opposed to categories)?
In answer to your question about what types of content might go into a Marker Bubble, I'd like to include the ability to hyperlink to either a page for "All posts at this location" or "Specified post/page". The simplest way to achieve this would be with a text box allowing html, but it would be pretty slick to have the option with a drop down box or radio buttons. -
Inappropriate?AJ ... can you please specify what the variables in your expression above control? Your documentation explains the height and width variables, but what do the others control (... -1, true, true)? What other possible variables are there?
-
Inappropriate?Here is the current documentation for the function.
---
// $height, $width are the h/w in pixels of the map
// $locations is the last N locations to put on the map, be default puts *all* locations
// $unique_id is a true/false if a unique_id is required
// $loop_locations set this to true if you're running this in a Post loop and want a map of the currently visible posts
// $zoom_level set the map zoom level for the overview. Default is to auto zoom to show all markers.
function geopress_map($height = "", $width = "", $locations = -1, $unique_id, $loop_locations = false, $zoom_level = -1)
---
Someone did submit a patch to have better map overview functionality for also including routes - so this function may move to merge those two functions. -
Inappropriate?Hi AJ, I tried this, too, but am not getting the right results -- I think I may have found a bug.
For whatever reason, I only get one marker, with a bubble that shows multiple stories. Am I doing something wrong?
http://dailynewarker.com/category/crime/
I’m frustrated
-
I have the exact same problem. Look forward to a fix! Do you have one yet? -
Inappropriate?Ah - indeed it looks like there may be some kind of bug here - though not one I've seen before.
Not all the posts have locations, right? Seems like I need to make a test to try for varying posts with and without locations.
I’m sympathetic
-
Inappropriate?AJ, thanks for getting back. Yup, not all Crime posts have an exact location. If you need a copy of my WP database for test info, let me know and I'll send you the file. Oh, and feel free to contact me at any time at ken@dailynewarker.com.
Thanks. -
Inappropriate?Has anyone else had an issue with the geopress map function on a category page with IE.
I have it on a category page and it works fine in FireFox but it does not work in IE 6 or 7 If gives an error.
http://werentboulder.com/current-list...
LIne: 50
Object doesn't support this property or method.
I absolutely love this plug in, but I need to find a solution to the issue with IE. If any of you have it running on your site I would love to know how you got it working.
I am using it just like it is on the first post.
<?php echo geopress_map(200, 400, -1, true, true); ?> with a size change.
any ideas?
Thanks.
I’m frustrated
-
Inappropriate?I am experiencing the exact same problem in almost the exact same scenario in IE7. I'm using the same function on an Author page and getting the gray box and same message. The map works fine on individual post pages and on the Author page in FF 3.0. Has anyone heard any more on this?
I’m frustrated
-
Inappropriate?I am still looking ofr a solution as well. I have not heard anything more about it since I originally posted it here.
I’m sad
-
Inappropriate?it is installed, but inactive. is there a connection there?
-
Inappropriate?I was looking around and ran across nextgen causing some problems. I removed it and all the other javascript on my pages (minus the geopress stuff) and I'm still seeing the error. It appears as though the issue is with the geopress plugin and not any incompatibility with other plugins.
I’m undecided
-
Inappropriate?I was able to solve the IE6-7 issue on my site. It was related to a variable not being declared using 'var'. Firefox was ignoring this, but IE was not. I fixed it by editing line 1284 of geopress.php which should be in the geopress folder in your plugins directory.
The line looked like this:
$output .= 'geo_map'.$map_id.' = new Mapstraction("geo_map'.$map_id.'","'. $map_format .'");'."\n";
I added 'var' so it should now read like the line below.
$output .= 'var geo_map'.$map_id.' = new Mapstraction("geo_map'.$map_id.'","'. $map_format .'");'."\n";
Hopefully that solves your problem.
I’m happy
-
Inappropriate?Thanks for the fixes - these are all being added into the GeoPress code base and will be pushed out after some testing.
I’m thankful
Loading Profile...



EMPLOYEE



