GithubHelp home page GithubHelp logo

ivosturm / googlemapscustommarker Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 4.0 154 KB

Extended functionality for the Mendix GoogleMaps widget including drag and drop, markerclustering and customization of markers

JavaScript 99.34% HTML 0.60% CSS 0.06%

googlemapscustommarker's People

Contributors

jeltemx avatar shanafriedrice avatar

Watchers

 avatar

googlemapscustommarker's Issues

Latest version breaks widget

Hi Ivo,

I just upgraded to the latest version of the widget, from Mendix 6. However, when using version 1.2.1, the widget breaks, rendering fine, but showing only one object, which is the context object, instead of the object selected in the widget.

downloading the previous version (1.2.0) and everything works accordingly.

Loging in breaking version (v1.2.1)
image

Logging in working versoin (v1.2.0)
image

Obviously, no settings were changed while checking different versions.

Toggle dragging does not work

When the marker option Toggle dragging is enabled, the map does not load. Found out that the code
var toggleMarkerNode = dom.input({ type : 'checkbox', 'class' : 'toggleCheckBox'}); does not get executed properly. A fix would be awesome! Thanks!

Error when database source table is non-persistent

Hi. I get the following error on my Studio 8.17.0 console when serving the page on which the widget is placed.
com.mendix.core.CoreRuntimeException: Exception occurred in action '{"xpath":"//Addresses.ContributorForMap","amount":-1,"offset":-1,"returnsCount":false,"sort":[],"type":"RetrieveXPathSchemaRawAction"}', all database changes executed by this action were rolled back
at com.mendix.basis.actionmanagement.CoreActionHandlerImpl.processErrorState(CoreActionHandlerImpl.scala:151)

Caused by: com.mendix.connectionbus.ConnectionBusRuntimeException: An exception has occurred for the following request(s):
InternalLimitedXPathTextGetRequest (depth = -1): //Addresses.ContributorForMap
at com.mendix.connectionbus.RequestAnalyzer.doRequest(RequestAnalyzer.java:63)

Caused by: com.mendix.core.CoreRuntimeException: 'Addresses.ContributorForMap' is not a persistable entity
at com.mendix.connectionbus.DomainModelUtilImpl.getPersistableMetaObject(DomainModelUtil.scala:45)

On the developer console I get the following error:
Failed to load resource: the server responded with a status of 560 (560)
mxui.js?637482155426395462:79 Error
at new t (mxui.js?637482155426395462:39)
at mxui.js?637482155426395462:34
at mxui.js?637482155426395462:20
at Object.next (mxui.js?637482155426395462:20)
at a (mxui.js?637482155426395462:20)
(anonymous) @ mxui.js?637482155426395462:79
:8080/xas/:1

Any advice on how to proceed is appreciated!
googleMapsCustomMarker Configuration

Cannot determine address at this location

The widget has stopped working for me... If I drag a marker to a new position I get the following:
Cannot determine address at this location.
Drag the marker to update the formatted address field!

The latitude and longitude are updated correctly, but the address field is not populated. This worked OK for a few hours and then I started receiving this message. I tried registering for a Google Maps API key and entered this in the widget, but that doesn't seem to help. Any suggestions?

Zoom issue using current object as xpath constraint

When I use the XPath constraint "[id='[%CurrentObject%]']", there is only one marker to be shown. In this cases the map is zoomed to somewhere in de middle of the ocean, in stead of the city of Rotterdam, where the marker is positioned. When I zoom out to the world, I can see, the marker is there.

I hope what I have requested is possible.

result
setting1
setting2

Can't load markers in Mendix 8.11

Hi,

I can't load markers using Mendix 8.11. I get the following error message in the console:

obj.get is not a function TypeError: obj.get is not a function at S.<computed>.E.<anonymous> (http://localhost:8080/widgets/GoogleMapsCustomMarker/widget/GoogleMapsCustomMarker.js?637331078010923573:502:100) at http://localhost:8080/mxclientsystem/mxui/mxui.js?637331078010923573:5:27280 at Object.forEach (http://localhost:8080/mxclientsystem/mxui/mxui.js?637331078010923573:5:31063) at S.<computed>.E._refreshMap (http://localhost:8080/widgets/GoogleMapsCustomMarker/widget/GoogleMapsCustomMarker.js?637331078010923573:480:23) at S.<computed>.E.parseObjects (http://localhost:8080/widgets/GoogleMapsCustomMarker/widget/GoogleMapsCustomMarker.js?637331078010923573:684:9) at S.<computed>.E.<anonymous> (http://localhost:8080/widgets/GoogleMapsCustomMarker/widget/GoogleMapsCustomMarker.js?637331078010923573:584:12) at S.<computed>.E.<anonymous> (http://localhost:8080/mxclientsystem/mxui/mxui.js?637331078010923573:5:27280) at http://localhost:8080/mxclientsystem/mxui/mxui.js?637331078010923573:80:8288

Refreshing context dataview fetches wrong data

Hi Ivo,

Back again! :-)

Ran into the issue that, when I refresh my context object is refreshed, the widget fetches the wrong data.

Info:
The widget is in a dataview (EventMap)
image

The locations are in a seperate entity (AssetContainer) (with a constraint)
image

Initially the data loads fine as is seen by the logging of the widget (159 markers are retrieved, of the correct entity)
image

When issueing a refresh (Refresh EventMap) the widget centers on a marker at 0.0 / 0.0, and I see in the console that there's one retrieve done, which is the contextObject, and not the LocationObjects

image

I tested with the 'normal' Google Maps widget, and that one does work correctly.

Zoom level too high

I'm using the widget with a microflow as datasource in a mendix tab widget. When the widget is on the second tab (not the default one) the zoomlevel is way too high. When that tab is the default tab displayed on opening the page, everything looks fine. Any solution/workaround for this? Thanks.

Enhancement: On click microflow button styling

Hi Ivo,

Back again ;-)
When I select an on click microflow in the widget, there's automatically a buton created in the infowindow, which is great, and was exactly what I was looking for. However, the styling of the info window is a bit off when the button is shown:

image

Besides that, I think it would be a great addition if we could:

  1. Set the label of the created button
  2. set some classes the button should have, to make the buttons more in line with the rest of the application.

Would like to hear what you think!

PS: Congrats on being chosen as an MVP! ;-)
Regards,
Paul

Non-Persistent Entity as ContextObject for DS-MF

Hi,
why is it not possible to have a non-persistent entity as contextobject for the datasource microflow?

Scenario:
I want to develop a map view with a dropdown, where the user can choose via dropdown, which markers are shown.

Best regards,
Alex

Enum images do not render

When using the 'Enum based marker image' it does not render based on the Enum value. It defaults back to either the pin or default image.

Modeler: 7.22.0

Any help will be appreciated, Thanks.

Make InfoWindowLabel optional

Hi Ivo it's me again :),

Currently the InfoWindowLabel is set with a default value and even if one sets the parameter in the Widget-Config to empty or ' ' there is still the ':' left in front of the marker label text.

For now I will fork the repository and remove the label, as it is not needed in my application.
But for future applications it would be awesome, if the label is optional.

Best regards,
Alex

Issue with disableInfoWindowDragend

I'm receiving an error saying 'disableInfoWindowDragend is not defined' when I use this widget (bothy the version for Mx6 and Mx7). I think the problem is in line 61 of GoogleMapsCustomMarker.xml where 'disbaleInfowWindowDragend' needs to be changed to 'disableInfoWindowDragend' (extra w and mis-spelled disable).
Also in line 574 on GoogleMapsCustomMarker.js 'if (disableInfoWindowDragend === false){' should be changed to 'if (this.disableInfoWindowDragend === false){'
These changes solved the error I was getting in the console

Widget does not render ok when inside a tab

Hi Ivo,

We use the Google Maps custom marker in our project. We work with tabs a lot and the widget doesn't seems render ok when it is within a tab. Furthermore I miss the option to set the overall zoom level. Could you please look into this? I attached a screenshot how it shows up inside a tab in our project.
If you have any questions feel free to contact me!

image

Regards,

Michael

Pan to Context does not work when default lat-long are set

Hi,

I'm having an issue where if I have Pan to Context set as Yes, and a default lat-long value, then Pan to Context no longer works.

This is also an issue in the GoogleMaps widget, however, this can be worked around by setting default values of the attributes (to get the desired effect). Unfortunately, I cannot do this with this widget.

Thanks in advance,

Tom

Marker does not show for uncommitted object

The widget works great if the location object is committed, but if the object is not committed the marker does not show and the map shows blue sea only. It would be great if the widget would also work for uncommitted objects, because it would be easier to make the page's Cancel button work well if nothing has been commited.

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.