GithubHelp home page GithubHelp logo

rvalitov / widgetkit-map-ex Goto Github PK

View Code? Open in Web Editor NEW
22.0 10.0 3.0 1.92 MB

Responsive version of Yootheme's Map Widget (Widgetkit2) with center map point and advanced features

License: GNU General Public License v3.0

PHP 82.18% JavaScript 17.53% CSS 0.29%
yootheme map widgetkit widget joomla wordpress plugin google-maps google-maps-api

widgetkit-map-ex's Introduction

Version Widgetkit Widgetkit 3 Joomla Wordpress PHP7 YoothemePro

MapEx widget logo

Overview

MapEx is an advanced Map widget for Yootheme Widgetkit2. After installation it becomes available in the Widgets list as a "native" widget and can be used as any other widget.

Notice about Widgetkit 3 and status of this project: Yootheme announced a third version of Widgetkit on January 26th, 2021. I received reports that after upgrade to Widgetkit 3 this widget does not work properly. I'm very sorry that I currently not able to devote my time to this project to develop it further. In its current state it's "bug free" and works with Widgetkit 2 and Joomla 3. Currently, I don't have plans to add support for Widgetkit 3 or add any other serious improvements. This widget has been my pet project that I was doing in my free time, and I've been happy to share it for free with the community. As I stopped using Widgetkit in my own projects, I lost motivation in further updates to this widget. I'm happy if my work and widgets were of any help or use in your websites!

Features

Basic Features

  • Based on Google Map - the widget uses Google Map API to create the map.
  • Map with markers - the widget shows a map with optional markers on it.
  • Styled map - you can change the visual look of the map.
  • Backward compatibility - all other behavior, styling and features of the original Map widget are preserved.
  • Use with your existing data - you can easily convert your existing Map widgets into MapEx preserving all the data and options.
  • Compatible with ZOO - you can use MapEx with Yootheme's ZOO, read more.
  • Compatible with Yootheme Pro - you can use MapEx with Yootheme Pro.

Unique Features

The new features that the MapEx has and that are not available in the original Map widget:

  • Responsive behavior - the map will automatically adjust (pan & zoom) if the user changes the window size or orientation (on mobile devices). The problem's description.
  • Custom pin images - you can set a custom icon for all pin markers or set a unique image for each marker (Read more).
  • Google Maps API key - you can enter your key that will be used in all instances of the widget. Read more
  • Advanced markers clustering mode with custom images - a full control of grouping the markers into clusters to provide a better user experience. Online collection of markers is also available. Read more.
  • Center map - you can put an arbitrary center of the map. This feature is not available in the original Map widget - problem exists since 2013, e.g. post#1, post#2.
  • Correct visualization inside the lightbox (modal) - there's a problem with the original Map widget when the widget is not rendered correctly when displayed inside the modal dialog: the map tiles are not rendered completely or partly, so the widget is not visible properly. This MapEx widget fixes this issue. Read more.
  • Correct visualization inside other widgets - widgets from Yootheme don't support nesting inside of each other. This MapEx widget fixes this issue and can be used inside other widgets (e.g. Switcher) or UIKit components (e.g. Tabs). Read more.
  • Auto close (hide) popup windows - you can set an option to automatically close popup info windows, so that only one window can be visible at at time. Read more
  • Tooltips for all options - it's much easier to use the widget, because tooltips are available for all settings.
  • More map types (Roadmap, Satellite, Hybrid, Terrain, Styled) - the widget supports all standard map types that are available at Google Maps, read more.
  • Advanced map controls - you can customize visibility of all map controls and tweak their look, read more.
  • Sophisticated styling options - you can create your own custom map with unique appearance using various styling options and Wizard, read more.
  • Support of SEF URLs - search engine friendly links are supported, no matter where you publish these links in the widget, read more.
  • Update notifications - you will be notified if new versions of the widget are available.
  • Multilingual interface, translated into languages:
    • English (en_GB)
    • Русский (ru_RU)
    • Deutsch (de_DE)
    • Your language not listed? You can help with translation, read more.
  • Access to the original Google Map object - Javascript object that is used in creation of the map. So, the user may change and/or modify the object as he needs from any web page using Javascript which provides vast opportunities for Javascript programmers to customize the map using native Google Map API, read more.

Supported platforms

  • The core code is based on Widgetkit 2.5.3 and was updated since accordingly. This widget should work with any Widgetkit 2.4.x and later (recommended 2.5.0+). Tested with Widgetkit 2.6.x, 2.7.x, 2.8.x, 2.9.x too.
  • PHP5 and PHP7 compatible
  • Joomla 3.4.x or later. Tested on Joomla 3.4.x, 3.5.x, 3.6.x, 3.7.x, 3.8.x.
  • Wordpress 4.4.x or later

Read full system requirements here.

How to install?

The installation procedure is described here.

The manual

Some issues about using the widget are available in the Wiki area.

Authors, Contributors and Acknowledgment

  • This widget is created by Ramil Valitov.
  • The code is based on the original Map widget by Yootheme.
  • Logo designed by Freepik
  • Special thanks to Florian, member of the Yootheme support team, for his post about the problem with the map widget displayed in a lightbox and the approach how to solve it (however, we use another better solution now).
  • Thanks to Marco Rensch for testing this widget with ZOO and providing related instructions; making translation to German language.

Disclaimer

This project is NOT affiliated with, endorsed, or sponsored by the Yootheme. Widgetkit, its name, trademark, and other aspects of the app are trademarked and owned by their respective owners.

Feedback

Your feedback is very appreciated. If you want to see new features in this module, please, post your ideas and feature requests in the issue tracker.

Donations

This is a free project that I do in my spare time. If you find it useful, then you can support it by donating some amount of money. This will help to keep the project alive and making it better: develop new features, make new releases, fix bugs, update the manuals, and provide at least some minimal technical support (there's an issue tracker here).

You can choose any payment method you prefer:

Your Currency Payment Method
Euro € Card PayPal
USD $ Card PayPal
Russian Ruble ₽ Card PayPal YandexMoney
Other Card PayPal

Support or Contact

Having trouble with MapEx Widget? May be something has already been described in the Wiki area or reported in the issue tracker. If you don't find your problem there, then, please, add your issue there.

Being a free project which I do in my spare time, I hope you understand that I can't offer 24/7 support:) You may contact me via e-mail [email protected], I will try to answer to all of them (if such messages imply an answer), however, not immediately, it may take a few days or a week... so, just be patient.

Note, that I can answer only to questions and problems directly related to MapEx widget. Answers to basic questions about the widgetkit nature and simple help about how to use widgets in general or how to use Joomla you can find in appropriate forums:

widgetkit-map-ex's People

Contributors

jasonheecs avatar rvalitov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

widgetkit-map-ex's Issues

Maps do not work in UIKit tabs

Expected behavior

The maps do not get properly rendered, when they are in UIKit tab that is not selected on page load - pins centering does not work at least and this is probably due to wrong size calculations on hidden DOM objects.

Actual behavior

When the map tab gets rendered, the map does not render on it's right position and also shows some other odd behavior.

Steps to reproduce the behavior

Put a map widget in an UIKit tab set, in a tab that is not selected by default.

System information

CMS type: Joomla

CMS version: 3.5.1

Version of the widget:1.4.7

My fix is to add the following in $(document).ready(...) in widget.php :

jQuery(document).on(
    "display.uk.check",
    function(event) {
        var self = jQuery(event.target);
        var map = self.find('[id^="wk-map-ex"]');
        if(map.is(':visible')) {
            map.each(
                function() {
                    var id = jQuery(this).attr('id');
                    var item = getWidgetkitMap(id);
                    if(item) {
                        google.maps.event.trigger(item, "resize");
                        var sub_id = id.substring(9);
                        if(typeof window['updateMap' + sub_id] === 'function') {
                            window['updateMap' + sub_id](item);
                        }
                    }
                }
            );
        }
    }
);

Missing translation

The current obviously doesn't support translation of the following strings:

MapEx specific strings

  • Enables/disables the appearance of a Rotate control for controlling the orientation of 45° imagery. By default, the control's presence is determined by the presence or absence of 45° imagery for the given map type at the current zoom and location. You cannot make the control appear if no 45° imagery is currently available.
  • Cluster Marker Level
  • %from% to %to%
  • e.g. %example%
  • Downloaded information about # items
  • Inherit

The following strings are custom fields that unfortunately are not translatable by Widgetkit design:

  • Location
  • Enter a location
  • CUSTOM PIN IMAGE
  • CUSTOM PIN ANCHOR X (PX)
  • CUSTOM PIN ANCHOR Y (PX)

General Widgetkit strings

To translate the following general strings that are shared between different widgets, please, follow this project.

  • Settings
  • Select
  • Manage Fields
  • Add Item
  • Add Media
  • Drop files here
  • Upload
  • Add Folder
  • Pick Media
  • Save
  • Save & Close

Remove custom marker field

This field appeared in Widgetkit 2.7.x and automatically added into MapEx. The UI of MapEx must be rewritten to remove this disturbing field. Currently MapEx ignores this field. This issue is connected with #30

Map Widget Custom Field Problem

Google API Key will not work

Hello,

It seems as if the API key is not being used properly. If I use the normal map widget, I have no problems. When I use the Map-Ex widget, I get an error message. Both widgets use the same API key. See: http://www.geliti.de/urlaub-am-petzinsee/ausflugsziele

That worked until recently. This must have happened with an update. I am using J3.6.4 and Widgetkit 2.8.0.

Can you help me?

Thanks, Sven

Feature: set different zoom level for responsive breakpoints.

The problem

If there are several places that you want to show in the widget, then a problem with zoom level can happen. If you initially set the zoom level according to a large screen monitor, then such map on smaller screens (e.g. smartphones) will look like it has a too large scale. And map points that were visible on larger screens will invisible (out of the screen area) in this case.

Example

Screenshot of the map on a large screen:

Large Screen

Screenshot of the same map on smartphone:

Smartphone

Possible implementation

To fix this behavior it's suggested to add some extra settings to control the zoom level on various devices. For example a field call Tablet Zoom level and another one called Phone Zoom level. Or may be "auto zoom" feature will be added.

Custom unique marker using Zoo content?

Is it possible to map a custom unique marker from Zoo content (image) instead of widgetkit content?

System information

CMS type: Joomla or WordPress

CMS version:

Version of the widget:

Website URL:

Debug output of the widget:

Центровка карты

На сайте центрую карту, все ок показывает что бы сразу помещались два города. А на мобильном карта остается в том же зуме что и на сайте в итоге мы видим центр карты без точек.
default
2

CMS type: Joomla or WordPress
Joomla
CMS version:
последняя
Version of the widget:
v1.4.3
Website URL:

Debug output of the widget:

Feature: cluster custom icons

Currently custom icons are supported for individual locations. This feature adds ability to customize cluster icons.

Feature: auto hide popup windows

When user clicks on a pin, then popup info window appears. If there are several pins on a map, then every time you click on a pin, a new window will show up. Other windows will still be visible and it's the user who can close or hide the windows.

The idea is to add an option that allows to auto hide (close) other popup info windows every time the user clicks on a pin, so that maximum only one single (active or current) popup window will be visible on a screen.

Feature: import and export settings

Ability to save or load settings of the widget. This will help to quickly move or copy a widget from one site to another.

  • export data
  • import data
  • import + export integration, tests

Failed to parse SourceMap underscore-min.map

If you open a console log at the backend, then a browser may write a message

Failed to parse SourceMap: http://website.com/administrator/components/com_widgetkit/plugins/widgets/map_ex/assets/underscore-min.map

This error message doesn't influence or break the functionality of the widget, because the browser just couldn't find the map file for minified version of JS.

Does not take German Text for Gamma Value Description

Expected behavior

With the German de_DE.json File it should take the German Translation for the Gamma Description.

Actual behavior

It shows the English Text - even if en_GB.json is not installed

Steps to reproduce the behavior

Use actual de_DE.json File in Beta 1.5.0.2

System information

CMS type: Joomla

CMS version: 3.5.1

Version of the widget: 1.5.0.2

Website URL: inst.nx-designs.ch

Debug output of the widget:
Debug Mode still on
bildschirmfoto 2016-06-24 um 23 37 17

The filed custom pin Image does not show up

Expected behavior : once we have selected the "Custom" option for the "Marker Pin Icon", I should see the "custom pin image" in the list of my "new fields"

Actual behavior I dont have it, I only have the basic ones : facebook, badge, custom, etc .. And if I choose the "custom", I only have text / texarea/tag/boolean/media/location

Steps to reproduce the behavior

In Settings, select the "Custom" option for the "Marker Pin Icon"
In content, add a new field : mange field + new field

System information

CMS type: WordPress

CMS version: WordPress 4.5.2 with theme Nirvana.

Version of the widget:2.4.8

Website URL:yoga-en-provence.com

Debug output of the widget:

Links in content are not SEO friendly

Expected behavior

When I put a site link in the content of a place in the regular form of "/index.php?...." and with some SEO activated (JoomSEF in my case), the links should get converted to their SEO friendly url.

Actual behavior

Actually the links stay in their original form.

Steps to reproduce the behavior

See 'expected behavior'.

CMS type: Joomla

CMS version: 3.5.1

Version of the widget: 1.4.7

My current fix (and it seems to work ok) is to do JRoute::_($item->escape('link')) on the links output in _content.php

Translation to French language

My French is very limited, so help is required here. If you can translate widget into French, then your help is very welcome! Instructions are here.

Debug Error Call to undefined function url_exists()

Expected behavior

Debug Informations comes up.

Actual behavior

Page blockes and Message "Call to undefined function url_exists()"
See also #40

Steps to reproduce the behavior

Define a Custom marker image
activate Debug Option
Refresh the Frontpage

System information

CMS type: Joomla

CMS version: 3.5.1

Version of the widget: 1.5.0.2

Website URL: inst.nx-designs.ch

Debug output of the widget: no debug infos loaded

Js error: Uncaught ReferenceError: getWidgetkitMap is not defined

Installed your extend widgetkit map today on a joomla site. Wehn it loads it throws the following js error: Uncaught ReferenceError: getWidgetkitMap is not defined.

This is the line of code it complains about:
var item=getWidgetkitMap("wk-map-ex56b21550c7f19");

What file should contain the getWidgetkitMap function?

We are using Widgetkit 2.5.3

Custom Markes want show (still loads default)

on our page we're not able to setup custom markes as you describe in your Guide.
We use:
joomla 3.4.8
widgetkit 2.5.3
Link: http://www.golferschoice.ch/karte

we've just settet up the general custom marker under Settings --> Map
The Widget is showing but not with our Marker, just with the default.
Also if we additionaly setup a custom icon for each element (after we have activated Custom in the settings) nothing changes. We have also tried to use different PNG Images (265x256px & 32x32px Size)
Please let me know if you need more details.
I dont see any error in the console - print debug info is turned on.

Our Settings and the Page screen:
mapview
generalsettings

and one of the items:
itemsetting

kind regards
Marco

Не работает MapEx и Map на одной странице

На странице у меня две карты обычный map и MapEx. Не показывается модуль вообще, т.е. в контенте место для него выделилось, но модуля нет (карта не появилась). Модуль добавил как обычно и стандартный Map (Widgetkit). Создал два маркера. Обыйчный работает, а MapEx нет.

CMS type: Joomla or WordPress
Joomla
CMS version:
3.4.8
Version of the widget:
v1.4.3
Website URL:
evrokaskad.ru
Debug output of the widget:

Feature: custom independent UI controls for selecting location

Currently the MapEx uses the standard UI controls for selecting the location of markers on the map. These controls are shipped with Widgetkit and differ from version to version of the Widgetkit. Making own controls will make the MapEx widget more independent and stable to Widgetkit upgrades.

This issue is mandatory before implementing #9.

Widgetkit Map - Google Maps API error: MissingKeyMapError

You may see a error message:

Oops! Something went wrong.
This page didn't load Google Maps correctly. See the JavaScript console for technical details.

Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details

The console log contains the following error:

Google Maps API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error

It means that you didn't setup the Google Maps API key. You can enter this key in the settings of the MapEx widget since version 1.5.0.1, read more.

Add tooltips to all elements

Currently tooltips are only added to unique options that are not available in the original widgetkit. Adding tooltips to all options will make the whole widget more user-friendly and allow using it without referring to the Yootheme manual.

User Map

is it possible to use my own maps? I make some with special areas in google My Maps with pylonen.

Feature: add option to enter Google Maps key

Current code doesn't use Google Maps key. This rises warning in the latest release of the Google Maps API. Option to use the Google Maps key can help to use the widget on heavily loaded websites by enabling payed plans of Google Maps.

Incomplete Translation of subscription form

Expected behavior

All Text Phrases are in the selected Language

Actual behavior

For at least one Text Phrase is no translation avaiable.

Steps to reproduce the behavior

Do A Subscription for the Newsletter - tafter the click on submit his text appears:
"Almost finished... We need to confirm your email address. To complete the subscription process, please click the link in the email we just sent you."

System information

CMS type: Joomla

CMS version: 3.5.1

Version of the widget: 1.5.0.2

Website URL: inst.nx-designs.ch

Debug output of the widget:
still on :-)

Feature: global settings

Add a new section and create an approach to store global settings: such settings are shared between all instances of the widget. For example, the settings can store the Google Maps API Key #22

The markers appear in widgets when shouldn't

If several widgets are displayed on the same page, then some markers defined only for the first widget appear in other widgets, too. Happens in latest 1.5.x pre-prelease version of widget.

Autocomplete not working when typing location

Expected behavior

Allow me to start enter an adress and that google suggest adresses matching the input

Actual behavior

Nothing happens. grey input on the right side of the input stating that: "Field disabled by MapEx widget"

Steps to reproduce the behavior

System information

Plugin version v1.5.1
Plugin build date 14/07/2016
Widgetkit version 2.7.3
Database version 2.0.0
jQuery version 1.12.4
UIkit version 2.26.2
AngularJS version 1.3.20
PHP version 7.0.8 (fpm-fcgi)

CMS type: Joomla or WordPress
Joomla

CMS version:

Version of the widget:

Website URL:

Debug output of the widget:

Ссылки на маркеры на карте

Expected behavior

Actual behavior

Steps to reproduce the behavior

System information

CMS type: Joomla or WordPress
Joomla
CMS version:
последняя
Version of the widget:

Website URL:

Debug output of the widget:

Интересует такой вопрос. Есть ли у маркеров ссылки? т.е. при нажатии на маркер на карте должна быть ссылка (с определенным увеличением карты.) т.е. щелкнули на маркер приблизился маркер масштаб карты увеличилась на определенное расстояние. напишу пример:
к примеру есть много адресов разных магазинов щелкая в отдельном списке на любой магазин или на адрес этого магазина или на логотип сразу переходит на карту которая на этой же странице но отображается ниже списка адресов увеличивается масштаб карты и высвечивается именно маркер этого магазина и уже открытый балун.

Map Type Selection display failure

Expected behavior

If i deactivate Styled Map Type and choose 3 other options and Activate the ability for the user to select the map he can change it.

Actual behavior

The User can change the map type but the selection on the frontside has per default no mapstyle entry.

Steps to reproduce the behavior

activate the option to choose the map type on the frontend
deactivate the option for the styled Map

System information

CMS type: Joomla

CMS version: 3.5.1

Version of the widget: 1.5.0.2

Website URL: http://inst.nx-designs.ch/

Debug output of the widget:
debug mode is still on.
bildschirmfoto 2016-06-24 um 23 18 59

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.