Conversation
| <caption>API key</caption> | ||
| <category>General</category> | ||
| <description>The Google Maps Javascript API v3 does not require an API key to function correctly. However, Google strongly encourages you to load the Maps API using an APIs key</description> | ||
| <description>The Google Maps Javascript API v3 requires an API key.</description> |
There was a problem hiding this comment.
This is the DEPRECATED older version of Google Maps
| <property key="onClickMicroflow" type="microflow" required="false" entityProperty="locationsEntity"> | ||
| <caption>On click microflow</caption> | ||
| <category>Markers</category> | ||
| <description>The microflow that will be executed when a marker is click </description> |
| <property key="onClickNanoflow" type="nanoflow" required="false" entityProperty="locationsEntity"> | ||
| <caption>On click nanoflow</caption> | ||
| <category>Markers</category> | ||
| <description>The nanoflow that will be executed when a marker is click </description> |
| <property key="page" type="form" required="false"> | ||
| <caption>Page</caption> | ||
| <category>Markers</category> | ||
| <description>The page that will be opened when a marker is click</description> |
| return errorMessage; | ||
| } | ||
|
|
||
| private executeOnClickAction = (data: LatLng) => { |
There was a problem hiding this comment.
What does this function do creates an object 'and' also executes an action, Function should do one thing. separate this => createOnclickObject , executeOnClick
| _args?: { | ||
| location?: "content" | "popup" | "modal", | ||
| domNode?: HTMLElement, | ||
| location?: "content" | "popup" | "modal" | "node", |
There was a problem hiding this comment.
Is node used anywhere or just in code
There was a problem hiding this comment.
I added node because the mendix client typings API openForm was updated and argument location changed to "content" | "popup" | "modal" | "node"
| error: error => window.mx.ui.error(`Error while executing the on change nanoflow: ${error.message}`) | ||
| }); | ||
| } else if (onClickEvent === "showPage" && page) { | ||
| context.setContext(object.getEntity(), object.getGuid()); |
There was a problem hiding this comment.
Move this to the line after creating the context or in the new function after separating
const context = new mendix.lib.MxContext();
context.setContext(object.getEntity(), object.getGuid());
| public static validateProps(props: GoogleMapContainerProps): string { | ||
| let errorMessage = ""; | ||
| if (props.onClickEvent === "callMicroflow" && !props.onClickMicroflow) { | ||
| errorMessage = "A 'Microflow' is required for 'Markers' 'Call a microflow'"; |
There was a problem hiding this comment.
A 'Microflow' is required for on click 'Marker' event 'Call a Microflow'
| } else if (props.onClickEvent === "callNanoflow" && !props.onClickNanoflow.nanoflow) { | ||
| errorMessage = "A 'Nanoflow' is required for 'Markers' 'Call a nanoflow'"; | ||
| } else if (props.onClickEvent === "showPage" && !props.page) { | ||
| errorMessage = "A 'Page' is required for 'Markers' 'Show a page'"; |
| if (props.onClickEvent === "callMicroflow" && !props.onClickMicroflow) { | ||
| errorMessage = "A 'Microflow' is required for 'Markers' 'Call a microflow'"; | ||
| } else if (props.onClickEvent === "callNanoflow" && !props.onClickNanoflow.nanoflow) { | ||
| errorMessage = "A 'Nanoflow' is required for 'Markers' 'Call a nanoflow'"; |
1d11feb to
522d43e
Compare
Codecov Report
@@ Coverage Diff @@
## master #13 +/- ##
==========================================
- Coverage 82.5% 81.59% -0.91%
==========================================
Files 3 3
Lines 160 163 +3
Branches 42 43 +1
==========================================
+ Hits 132 133 +1
- Misses 28 30 +2
Continue to review full report at Codecov.
|
522d43e to
e1518d9
Compare
3416a75 to
179806e
Compare
djkwagala
left a comment
There was a problem hiding this comment.
When onClick === "DoNothing" atleast we should have a onhover to show the coordinates. (this is the same case with charts.
This option can be disabled via xml-configs
This is to deal with situations where the google-maps interpreted the location via its "Address" and the coordinates were missing or "0,0".
8ebc13a to
f1f3dab
Compare
f1f3dab to
2ee9c24
Compare
Uh oh!
There was an error while loading. Please reload this page.