开发者 | willybahuaud |
---|---|
更新时间 | 2013年5月17日 03:09 |
捐献地址: | 去捐款 |
PHP版本: | 3.0 及以上 |
WordPress版本: | 3.5.1 |
版权: | GPLv2 or later |
版权网址: | 版权信息 |
/wp-content/plugins/
directory[maps]
into your content area, or use <?php echo nbm_render_map(); ?>
into one template file to render the map[place]
into your place content area, or use <?php echo nbm_place_information(); ?>
into your single place (or specified CPT) template file to show information about current placeUsing nbm_post_type. You just have to modify then paste this following code into your functions.php theme file.
<?php add_filter( 'nbm_post_type', 'function_for_alter' ); function function_for_alter(){ return 'posts'; } ?>
Tired of the same old maps? CloudMade give ability for users to use custom map or build thier own.
After choosing, you juste have to precise the id of your custom style into your functions.php, by the way of the filter cloudmade_style.
<?php add_filter( 'cloudmade_style', 'my_custom_style' ); function my_custom_style(){ //If I want to use "midnight Comander coloration" style return 999; } ?>
Loading time tiles is still faster if you opt for a custom style proposed by CloudMade (8 possibilities).
You can see some examples at screenshots section.
Yes, there are other tile provider than CloudMade (used by default in this plugin). To chose for another, simply paste this function into your functions.php.
<?php add_filter( 'maps_datas', 'function_for_alter' ); function function_for_alter( $maps_datas ){ $maps_datas['tiles'] = "http://{s}.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg"; $maps_datas['attribution'] = "attribution I want/use to show"; $maps_datas['subdomains'] = array('otile1','otile2','otile3','otile4'); return $maps_datas; } ?>
I tested some tiles providers, and I confirm they work with Nearby Map :
Yes, doing this into your functions.php theme file.
places_args filter
<?php add_filter( 'places_args', 'function_for_alter' ); function function_for_alter( $args ){ $args['rewrite'] = array( 'slug', 'local business' ); $args['supports'][] = 'custom-fields'; return $args; } ?>
Use the filter namned nbm_try_to_find_with_openstreetmap. Just paste this :
<?php add_filter( 'nbm_try_to_find_with_openstreetmap', '__return_false' ); ?>
You can use yours, using cloudmade_key filter hook, into your functions.php
<?php add_filter( 'cloudmade_key', 'function_for_alter' ); function function_for_alter(){ return 'dfsljfdjfsdjfqsjdkdfjkfqf'; //for example } ?>
You can return false on nbm_need_more filter hook :
<?php add_filter( 'nbm_need_more', '__return_false' ); ?>
You can return false on nbm_need_route filter hook :
<?php add_filter( 'nbm_need_route', '__return_false' ); ?>
Just return false on nbm_places_link filter hook :
<?php add_filter( 'nbm_places_link', '__return_false' ); ?>
It's easy to rewrite all the query with markers_querys.
<?php add_filter( 'markers_querys', 'function_for_alter' ); function function_for_alter( $m ){ $m['order'] = 'DESC'; $m['tax_query'] = array( array( 'taxonomy' => 'type_of_place', 'field' => 'id', 'term' => 56 ) ); return $m; } ?>
There is nbm_map for that...
<?php add_filter( 'nbm_map', 'function_for_alter' ); function function_for_alter(){ //Do stuff... } ?>
Use nbm_place_information filter...
<?php add_filter( 'nbm_place_information', 'function_for_alter' ); function function_for_alter(){ //Do stuff... } ?>