Okay
  Public Ticket #2901061
Map design
Closed

Comments

  • sayvin started the conversation

    Is it possible to replace the map or to add a better look such as this?

     https://leafletjs.com/examples/quick-start/example.html

    The default one looks quite old.

  •  252
    The replied

    With current map it support our can easy customize than your example

  • sayvin replied

    I have tried replacing the leaflet.js and leaflet.css and adding the script but it does not work. 
    Can you please give me a hand? You are the ones who coded this.

  •  252
    The replied

    Hi, we only support free for features developed by us

  •  2
    shuttershades89 replied

    I want to help with the permission of the TheSky9 team.

    Leafletjs require a CSS and a JS library and will slow a little bit the loading page.

    Also Leafletjs are using the openstreetmap, so, why not use it directly OpenStreetMap?

    Steps to add openstreetmap, including the marker :

    # Go to  "\platform\themes\ultra\functions\"

    # Edit shortcodes.php and add these code lines and save

    3955878836.png
          //Openstreetmap
          add_shortcode('openstreetmap', __('OpenStreetMap'), __('OpenStreetMap'), function ($shortcode) {
              $title = $shortcode->title;
              $link = $shortcode->link;           return Theme::partial('shortcodes.openstreetmap', compact('title', 'link'));
          });       shortcode()->setAdminConfig('openstreetmap', function ($attributes) {
              return Theme::partial('shortcodes.openstreetmap-admin-config', compact('attributes'));
          });

    # Go to "platform\themes\ultra\partials\shortcodes\"

    # Create 2 files "openstreetmap-admin-config.blade.php"   and  "openstreetmap.blade.php"

    4310627297.png

    # Edit "openstreetmap-admin-config.blade.php" and add these code lines and save :

    <div class="form-group mb-3">
        <label class="control-label">{{ __('Title') }}</label>
    <input name="title" value="{{ Arr::get($attributes, 'title') }}" class="form-control" placeholder="Directions">
    </div>
    <div class="form-group mb-3">
        <label class="control-label">{{ __('Link') }}</label>
    </div>

    # Edit "openstreetmap.blade.php" and add these code lines and save :

    <div class="container">
    @if(!empty($title))
    <h3 class="mb-20 mt-20">{!! clean($title) !!}</h2>
    @endempty
    <div style="height: 400px; width: 100%; position: relative; text-align: right;">
        <div  style="height: 400px; width: 100%; overflow: hidden; background: none!important;">
          @if(!empty($link))
            <iframe width="100%" height="500" src="{!! clean($link) !!}" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>
          @endempty
        </div>
    </div>
    </div>

    # Go to https://openstreetmap.org and search for your address.

    1487984331.png

    You can move your marker on the map where do you want.

    # Copy embed code and paste to notepad or any other text editor

    # Copy the link from the embed code, like this :

    9810040157.png

    # Go to the admin dashboard and you will see the shortcode created

    8736999809.png
    3685638701.png

    Write your own title and paste the link extracted from the embed code.

    The result :))

    1516070295.png
  •  252
    The replied

    Hi,

    Keep in mind that as support policy, we won't support customization, we just support our existing code https://codecanyon.net/page/item_support_policy

  •  252
    The replied

    Hi shuttershades89,

    I have checked your code, your code is good but it's almost same as our Google Maps shortcode so we won't add this shortcode for now.

    We use Leafletjs because we can custom marker popup to display more information, for openstreetmap, it's an iframe so we can't customize it.

    8392162785.png

    Next time, please create your own issue. This ticket is created by sayvin and it has been closed already. Please don't disturb him. It's not good.

    Anyway, thanks for your suggestion.