Forum Replies Created
-
AuthorPosts
-
Hi,
That’s a very common problem with the maps API, please see the FAQ for some suggestions. If it’s a custom toggle, it will probably require some javascript to refresh the map:
Hi,
I’m glad you figured it out. It’s a CSS thing – when the browser is drawing the page, if the container element doesn’t have a fixed height (and blog pages usually don’t), then 100% height results in an actual size of 0 pixels.
If you create a fixed-height or full-screen container element then 100% should work.
Or just using a pixel height works fine, too.
Hi,
You need to know the map name (you can set it in the shortcode or it’ll default to ‘mapp0’ for the first map).
Then the code is:
mapp0.setCenter(-32,22);Or you can get the google map object and call its functions directly:
var gmap = mapp0.getMap(); gmap.setCenter(new google.maps.LatLng(-32, 22));Hi,
I think you’ll find The template file you want is probably “single.php”. There may be some tutorials out there for the twenty twelve theme files, here’s one:
http://www.class.giip.org/classes/wordpress/lesson-3/
The mashup settings only apply to mashups. If you want to change the output behavior for single maps, you can modify the MapPress template file “map_poi.php” (see the documentation for an overview of copying/modifying the files).
This should always print the post title as the title and the address as the body:
<div class='mapp-iw'> <div class='mapp-title'> <?php if ($post = get_post($this->postid)) { echo "<a href='" . get_permalink($this->postid) . "' $target>" . $post->post_title . "</a>"; } ?> </div> <div class='mapp-body'> <?php echo $poi->get_thumbnail(array('class' => 'mapp-thumb')); ?> <?php echo $poi->get_address(); ?> </div> <div class='mapp-links'> <?php echo $poi->get_links(); ?> </div> </div>Hi,
There’s probably a few ways to speed things up.
First of all, if you can store the address in a custom field (or fields) then you can configure MapPress to automatically generate a map when each post is saved/published using that field as the address. You might need to use a CSV importer or similar tool to re-import the posts if the address isn’t already split out into a field.
Once the maps are created, rather than editing the marker title & body, just go to the MapPress settings and tell the plugin to display the post title for the title and the address for the body for mashups.
If you want to change the display further, or want to display something other than the address when viewing a map for a single post, then you can edit the MapPress template files.
Rather than inserting each map manually, you can just add a do_shortcode to your theme template file. You could also specify width there:
In version 2.40.4 I also added a setting for the default map size as a %. I haven’t released that version yet but if you send me an email I’ll be happy to send you a copy.
July 14, 2013 at 12:01 am in reply to: Automatically open the current POI when a map is displayed #12993Hi,
If you want to open a different infowindow initially, you can use a number like 1,2,3 to open the first, second or third post. For example:
[mappress initialopeninfo="2"]
should open the 3rd marker.
Hi,
1. It should work with just lat/lng. Does it work when you fill in an address field?
2. If you use lat/lng, that’s what will show in the directions box, but when you get the actual directions between those locations google will use the nearest street.
3. You can’t edit the location, you have to delete the POI and re-add it
Hi,
The plugin loads the maps API, reads the posts and displays them. The performance depends mostly on how long it takes to read the posts, which varies for each blog and server combination.
300 locations shouldn’t take more than a few seconds, but if you can reduce the locations displayed at once it will always be faster. For example, if you can use a category or tag to separate the big map into smaller maps.
Hi,
The data is a “serialized object” in PHP. You’ll see something like “s:10” – that’s string, length 10. So if you edit the description you would also need to change the length. You might be able to recover it if that’s the problem.
If that doesn’t help – and you don’t have any backup – then email me the object and try to tell me exactly what changed. I’ll see if I can recover it for you.
Hi, it’s really tricky to edit the tables manually. Are you using the current version (2.40.3)? If not, try upgrading to that version. Otherwise, I’m sorry but the POI data is probably not readable – you’ll need to retrieve a database backup or rebuild the map.
Hi,
No, that’s not possible. I think most sites I’ve seen do it by having individual maps for each page. For example:
1. Create individual posts for each location. Create a map in each post with a single marker for just that location.
2. Combine the posts using a mashup.
Then when the user clicks a marker on the mashup, the plugin can show a link to the post. When they open the post, you can display the individual map for that post at a higher zoom level.
July 10, 2013 at 5:03 pm in reply to: Automatically open the current POI when a map is displayed #12972Hi,
I don’t think I understood you question. If it helps: you can open the infowindow for the first POI on a map using the shortcode parameter initialopeninfo=”true”.
Hi,
I can’t say anything specific without seeing the site. If you’d like me to look at it you can post a URL or email me one to illustrate the problem.
In general, though, what you describe is a common problem in WordPress.
MapPress loads the standard version of jQuery that comes with WordPress(1.8.3). Some plugins and themes load different versions (usually older) which aren’t compatible. That can interfere with MapPress – or vice-versa.
You can sometimes resolve the problem by updating the theme/plugin, or preventing it from loading its own jQuery version.
Hi,
I’ve made the image clickable in version 2.40.4. I haven’t released that version yet, but if you like send me an email and I’ll send you a copy of the plugin that includes the fix.
Hi,
Unfortunately that’s not possible – only one infowindow can be open at a time on any given map.
-
AuthorPosts
