Forums › Premium Settings › Custom Map Markers
Tagged: custom marker, map marker, marker, premium setting
- This topic has 8 replies, 3 voices, and was last updated 4 years, 10 months ago by
thad.
-
AuthorPosts
-
March 16, 2016 at 12:32 am #51173
Diego Crescini
MemberHello, i just buy and activate “Premium Settings” addon for use different Map icon marker for my different post type. In the setting page i can select my different PNG for a different Post type as i see in the Premium settings page, but when i insert my Map in a website, The map continues to display default Map Marker.
Map need a shortcode for display custom marker?
Help me please.
ThanksDiego
Attachments:
You must be logged in to view attached files.March 17, 2016 at 9:20 am #51192Eyal Fitoussi
MemberHello Diego and thank you for the purchase.
Have you set the form to display the map icons per post type? You need to do so in the form editor under the “Map” tab in the “Map Icon” settings.
March 18, 2016 at 3:15 am #51215Diego Crescini
MemberI use this shortcode for display map and not use form. how i can set custom map icon marker in the shortcode? I use nearby location.
[gmw_nearby_locations element_id=”234″ nearby=”user” show_map=”true” show_locations_list=”false” get_directions=”Ottieni indicazioni” units=”kilometers” post_types=”mypost1,mypost2,mypost3″ results_count=”1000″ map_height=”600px”]
March 19, 2016 at 8:14 pm #51238Eyal Fitoussi
MemberHello Diego,
Unfortunately, Nearby Locations is not yet integrates with Premium Settings add-on. At the moment, it is only possible to apply the map icons feature to GEO my WP search forms. Nearby Locations integration with Premium Settings add-on will be only available after the release of Geo my WP 3.0.However, if you are comfortable with editing a core file, I can provide you with a few lines of code to add to a single core file. These lines of code will replace the Nearby Locations map icons with the Post Type icons you setup in the Premium Settings.
Let me know if you’d like to do that and I will guide you through it.
March 21, 2016 at 6:03 am #51245Diego Crescini
MemberHello, I need use premium setting with nearby locations. Send me everything i need to do for use it. I pay for that Add-on for nearby location.
I think that must explain that Premium setting is not compatible with NearbyLocation.I wait code for setup icon marker in Nearby Location.
ThanksDiego
March 23, 2016 at 12:25 am #51278Eyal Fitoussi
MemberHi Diego,
Please follow the steps below:
1) Open the file
gmw-nearby-location/includes/gmw-nearby-posts-class.php
2) Go to line 321 which should be:
123if ( !is_array( $this->args['post_types'] ) ) {$this->args['post_types'] = explode( ',', $this->args['post_types'] );}and just below add the script:
123$settings = gmw_get_options_group();$pt_settings = $settings['post_types_settings'];$icons_url = $settings['pt_map_icons']['url'];3) Go to line 368 which should be:
1$this->nearby_locations[$key]->info_window_content = $this->info_window_content( $map_items );and just below enter the script:
12345678910$map_icon = '_default.png';//per post type map iconsif ( ! empty( $pt_settings['post_types_icons'][$post->post_type] ) ) {$map_icon = $pt_settings['post_types_icons'][$post->post_type];}$map_icon = ( empty( $map_icon ) || $map_icon == '_default.png' ) ? '' : $icons_url.$map_icon;$this->nearby_locations[$key]->mapIcon = $map_icon;4) save the file and give it a try.
Let me know if that works.
March 23, 2016 at 5:30 am #51300Diego Crescini
Memberit works!!! Love it! now i must set correct dimension. Thanks
I hope you can update nearby location with this feature!Thanks
DiegoMarch 23, 2016 at 2:03 pm #51305Eyal Fitoussi
MemberYou are very welcome Diego. I am glad it worked.
This feature will definitely be added to the Nearby Locations. But that will happened after the major update of GEO my WP 3.0 and the add-on. Until then, you can safely use the script above.
April 15, 2016 at 11:06 am #51686thad
MemberWe’re considering purchasing the Premium Settings Addon and had a couple questions.
1) Is there a way to edit the global pin without the addon?
2) If we use the addon to select custom pins, can we still retain the numbers on the pins?Thank you!
-
AuthorPosts
The topic ‘Custom Map Markers’ is closed to new replies.