| @@ -170,9 +170,9 @@ | ||
| 170 | 170 | if(Plugin::$instance->editor->is_edit_mode() || empty($wdk_listing_id)) { |
| 171 | 171 | $this->data['is_edit_mode']= true; |
| 172 | 172 | } |
| 173 | 173 | |
| 174 | - echo $this->view('wdk-listing-map', $this->data); | |
| 174 | + $this->view('wdk-listing-map', $this->data, true); | |
| 175 | 175 | } |
| 176 | 176 | |
| 177 | 177 | private function generate_controls_conf() { |
| 178 | 178 | if(true){ |
| @@ -266,9 +266,9 @@ | ||
| 266 | 266 | $this->add_control( |
| 267 | 267 | 'field_id', |
| 268 | 268 | [ |
| 269 | 269 | 'label' => __( 'Marker position based on field with address (Detected gps by api)', 'wpdirectorykit' ), |
| 270 | - 'type' => \Elementor\Controls_Manager::SELECT, | |
| 270 | + 'type' => \Elementor\Controls_Manager::SELECT2, | |
| 271 | 271 | 'default' => '', |
| 272 | 272 | 'options' => $fields_list, |
| 273 | 273 | 'separator' => 'after', |
| 274 | 274 | ] |
| @@ -415,9 +415,11 @@ | ||
| 415 | 415 | $this->add_control( |
| 416 | 416 | 'jawg_map_key', |
| 417 | 417 | [ |
| 418 | 418 | 'label' => __( 'Jawg Map API Key', 'wpdirectorykit' ), |
| 419 | + /* translators: 1: URL. */ | |
| 419 | 420 | 'description' => wdk_sprintf(__( 'Please follow link and get API key <a href="%1$s" target="_blank"> here </a>', 'wpdirectorykit' ), 'https://www.jawg.io/en/pricing') |
| 421 | + /* translators: 1: URL. */ | |
| 420 | 422 | .' '.wdk_sprintf(__( 'or check demo maps <a href="%1$s" target="_blank"> here </a>', 'wpdirectorykit' ), 'https://www.jawg.io/en/maps'), |
| 421 | 423 | 'type' => \Elementor\Controls_Manager::TEXT, |
| 422 | 424 | 'default' => '', |
| 423 | 425 | 'condition' => [ |
| @@ -431,11 +433,31 @@ | ||
| 431 | 433 | ] |
| 432 | 434 | ); |
| 433 | 435 | |
| 434 | 436 | $this->add_control( |
| 437 | + 'carto_map_key', | |
| 438 | + [ | |
| 439 | + 'label' => __( 'Carto Map API Key', 'wpdirectorykit' ), | |
| 440 | + /* translators: 1: URL. */ | |
| 441 | + 'description' => wdk_sprintf(__( 'Please follow link and get API key <a href="%1$s" target="_blank"> here </a>', 'wpdirectorykit' ), 'https://carto.com/basemaps/apikey/'), | |
| 442 | + 'type' => \Elementor\Controls_Manager::TEXT, | |
| 443 | + 'default' => '', | |
| 444 | + 'condition' => [ | |
| 445 | + 'conf_custom_map_style' => [ | |
| 446 | + 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/light_all/{z}/{x}/{y}{r}.png', | |
| 447 | + 'https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png', | |
| 448 | + 'https://{s}.basemaps.cartocdn.com/rastertiles/voyager/{z}/{x}/{y}{r}.png', | |
| 449 | + 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}{r}.png', | |
| 450 | + ], | |
| 451 | + ], | |
| 452 | + ] | |
| 453 | + ); | |
| 454 | + | |
| 455 | + $this->add_control( | |
| 435 | 456 | 'thunderforest_map_key', |
| 436 | 457 | [ |
| 437 | 458 | 'label' => __( 'Thunderforest Map API Key', 'wpdirectorykit' ), |
| 459 | + /* translators: 1: URL. */ | |
| 438 | 460 | 'description' => wdk_sprintf(__( 'Please follow link and get API key <a href="%1$s" target="_blank"> here </a>', 'wpdirectorykit' ), 'https://www.thunderforest.com/pricing/'), |
| 439 | 461 | 'type' => \Elementor\Controls_Manager::TEXT, |
| 440 | 462 | 'default' => '', |
| 441 | 463 | 'condition' => [ |
| @@ -455,8 +477,9 @@ | ||
| 455 | 477 | $this->add_control( |
| 456 | 478 | 'google_map_key', |
| 457 | 479 | [ |
| 458 | 480 | 'label' => __( 'Google Map API Key', 'wpdirectorykit' ), |
| 481 | + /* translators: 1: URL. */ | |
| 459 | 482 | 'description' => wdk_sprintf(__( 'Please follow link and get API key <a href="%1$s" target="_blank"> here </a>', 'wpdirectorykit' ), 'https://developers.google.com/maps/documentation/javascript/get-api-key'), |
| 460 | 483 | 'type' => \Elementor\Controls_Manager::TEXT, |
| 461 | 484 | 'default' => '', |
| 462 | 485 | 'condition' => [ |
| @@ -557,9 +580,9 @@ | ||
| 557 | 580 | $this->add_control( |
| 558 | 581 | 'title_field_id', |
| 559 | 582 | [ |
| 560 | 583 | 'label' => __( 'Title Field', 'wpdirectorykit' ), |
| 561 | - 'type' => \Elementor\Controls_Manager::SELECT, | |
| 584 | + 'type' => \Elementor\Controls_Manager::SELECT2, | |
| 562 | 585 | 'default' => '', |
| 563 | 586 | 'options' => $fields_list, |
| 564 | 587 | ] |
| 565 | 588 | ); |
| @@ -567,9 +590,9 @@ | ||
| 567 | 590 | $this->add_control( |
| 568 | 591 | 'content_field_id', |
| 569 | 592 | [ |
| 570 | 593 | 'label' => __( 'Content Field', 'wpdirectorykit' ), |
| 571 | - 'type' => \Elementor\Controls_Manager::SELECT, | |
| 594 | + 'type' => \Elementor\Controls_Manager::SELECT2, | |
| 572 | 595 | 'default' => '', |
| 573 | 596 | 'options' => $fields_list, |
| 574 | 597 | ] |
| 575 | 598 | ); |