jeffreykemp / jk64-plugin-reportmap

Report Google Map APEX Plugin
https://jeffreykemp.github.io/jk64-plugin-reportmap/
MIT License
42 stars 16 forks source link

markerClick event #60

Closed BizSafe closed 5 years ago

BizSafe commented 5 years ago

Hi Jeffery, Firstly, thanks for your awesome plugin!!

I have a report that shows a bunch of markers. I have set the 'Set Item Name to ID on Click' to my item :P1_SELECTED and can see the ID is set each time I click on a marker. I am trying to get a dynamic action to redirect to a new page when :P1_SELECTED changes but that doesn't work so I thought the markerClick event might help and tried using a SetValue with this.data.id but I am not making any headway.

Any assistance would be greatly appreciated. In short, I need each marker to be a link

Thank you Sandy

jeffreykemp commented 5 years ago

Hi Sandy,

Thanks for trying the plugin. Typically the easiest way to do stuff like this is to put a dynamic action on change of the item P1_SELECTED; in your case I would have a dynamic action of "Submit" with a Request value (e.g. "GO"). You can then have a branch on your page which has a condition of "Request = GO" which redirects to the page you want.

I hope this helps.

Jeff

BizSafe commented 5 years ago

Thank you for the swift response Jeff, but I tried that and it doesn't work. These are the attributes I set for the plugin

[image: image.png]

I have an OnChange dynamic action set against P8_SELECTED, but the page does not submit. [image: image.png]

I also tried using the markerClick event but that didn't seem to work either. Could it be that other attributes are interfering?

Regards, Sandy

On Mon, Jun 17, 2019 at 2:04 PM Jeffrey Kemp notifications@github.com wrote:

Hi Sandy,

Thanks for trying the plugin. Typically the easiest way to do stuff like this is to put a dynamic action on change of the item P1_SELECTED; in your case I would have a dynamic action of "Submit" with a Request value (e.g. "GO"). You can then have a branch on your page which has a condition of "Request = GO" which redirects to the page you want.

I hope this helps.

Jeff

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jeffreykemp/jk64-plugin-reportmap/issues/60?email_source=notifications&email_token=AHUUSLXOWCGZETGW3NKYTYTP254UFA5CNFSM4HYVRXPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX26NTI#issuecomment-502654669, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUUSLRQDE3XY44JMIQNJS3P254UFANCNFSM4HYVRXPA .

jeffreykemp commented 5 years ago

I can't see your screen or your screenshots. Only way I can help you further is if you set up a test case on apex.oracle.com. Feel free to send me a link and login details to jeff@jk64.com.

BizSafe commented 5 years ago

Thanks Jeff, I'll do so and let you know when done

On Mon, Jun 17, 2019 at 4:06 PM Jeffrey Kemp notifications@github.com wrote:

I can't see your screen or your screenshots. Only way I can help you further is if you set up a test case on apex.oracle.com. Feel free to send me a link and login details to jeff@jk64.com.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jeffreykemp/jk64-plugin-reportmap/issues/60?email_source=notifications&email_token=AHUUSLSMQSNFZAC4EPYP5BDP26K5XA5CNFSM4HYVRXPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX3IXCY#issuecomment-502696843, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUUSLUL7OGCZ36ANZZXVDTP26K5XANCNFSM4HYVRXPA .

BizSafe commented 5 years ago

Hi Jeff,

I am seeing the following javascript error with the plugin on Chrome.

I suspect this is stopping the rest of my dynamic executions from triggering.

Any ideas?

desktop_all.min.js?v=19.1.0.00.15:2 jQuery.Deferred exception: Cannot read property 'lat' of undefined TypeError: Cannot read property 'lat' of undefined at Object.attribute05 ( https://ouramazingrace.com/ords/f?p=111:8:14331481050679::NO::::303:510) at Object.a.setValue ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:22:1469 ) at Object.da.doAction ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:21:5183 ) at Object.da.doActions ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:21:3664 ) at HTMLDivElement. ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:21:2597 ) at Function.each ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:2:2573 ) at w.fn.init.each ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:2:1240 ) at Object.da.actions ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:21:2315 ) at Object. ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:21:975 ) at Function.each ( https://ouramazingrace.com/i/libraries/apex/minified/desktop_all.min.js?v=19.1.0.00.15:2:2573) undefined w.Deferred.exceptionHook @ desktop_all.min.js?v=19.1.0.00.15:2 desktop_all.min.js?v=19.1.0.00.15:2 Uncaught TypeError: Cannot read property 'lat' of undefined at Object.attribute05 (f?p=111:8:14331481050679::NO::::303) at Object.a.setValue (desktop_all.min.js?v=19.1.0.00.15:22) at Object.da.doAction (desktop_all.min.js?v=19.1.0.00.15:21) at Object.da.doActions (desktop_all.min.js?v=19.1.0.00.15:21) at HTMLDivElement. (desktop_all.min.js?v=19.1.0.00.15:21) at Function.each (desktop_all.min.js?v=19.1.0.00.15:2) at w.fn.init.each (desktop_all.min.js?v=19.1.0.00.15:2) at Object.da.actions (desktop_all.min.js?v=19.1.0.00.15:21) at Object. (desktop_all.min.js?v=19.1.0.00.15:21) at Function.each (desktop_all.min.js?v=19.1.0.00.15:2)

Sandy

On Mon, Jun 17, 2019 at 4:43 PM BizSafe (PTY) Limited admin@bizsafe.co.za wrote:

Thanks Jeff, I'll do so and let you know when done

On Mon, Jun 17, 2019 at 4:06 PM Jeffrey Kemp notifications@github.com wrote:

I can't see your screen or your screenshots. Only way I can help you further is if you set up a test case on apex.oracle.com. Feel free to send me a link and login details to jeff@jk64.com.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jeffreykemp/jk64-plugin-reportmap/issues/60?email_source=notifications&email_token=AHUUSLSMQSNFZAC4EPYP5BDP26K5XA5CNFSM4HYVRXPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODX3IXCY#issuecomment-502696843, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUUSLUL7OGCZ36ANZZXVDTP26K5XANCNFSM4HYVRXPA .

jeffreykemp commented 5 years ago

It looks like you've defined a dynamic action that does a Set Value. What is the expression you have used for your Set Value?

BizSafe commented 5 years ago

Hi,

I have a geolocate event that sets P8_MY_LAT to this.data.lat

Sandy

On Wed, Jun 19, 2019 at 9:51 AM Jeffrey Kemp notifications@github.com wrote:

It looks like you've defined a dynamic action that does a Set Value. What is the expression you have used for your Set Value?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jeffreykemp/jk64-plugin-reportmap/issues/60?email_source=notifications&email_token=AHUUSLXT3AAB5LDC4BQ7EKLP3HQRDA5CNFSM4HYVRXPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBAOJQ#issuecomment-503449382, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUUSLS6JCOGFOWAOL7RGF3P3HQRDANCNFSM4HYVRXPA .

jeffreykemp commented 5 years ago

On the Action, have you set Fire on Initialization to No?

BizSafe commented 5 years ago

Hi, it's set to yes as I need to get the users location when they open the page

On Wed, Jun 19, 2019 at 10:05 AM Jeffrey Kemp notifications@github.com wrote:

On the Action, have you set Fire on Initialization to No?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jeffreykemp/jk64-plugin-reportmap/issues/60?email_source=notifications&email_token=AHUUSLRK3FWVI4RHZ3L4OHLP3HSFRA5CNFSM4HYVRXPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBBRAA#issuecomment-503453824, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUUSLRHBQDI45HWNOAZHCDP3HSFRANCNFSM4HYVRXPA .

BizSafe commented 5 years ago

you so clever ;o)

I set it off and everything is still working as intended.

Thank you Sandy

On Wed, Jun 19, 2019 at 10:10 AM BizSafe (PTY) Limited admin@bizsafe.co.za wrote:

Hi, it's set to yes as I need to get the users location when they open the page

On Wed, Jun 19, 2019 at 10:05 AM Jeffrey Kemp notifications@github.com wrote:

On the Action, have you set Fire on Initialization to No?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jeffreykemp/jk64-plugin-reportmap/issues/60?email_source=notifications&email_token=AHUUSLRK3FWVI4RHZ3L4OHLP3HSFRA5CNFSM4HYVRXPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBBRAA#issuecomment-503453824, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUUSLRHBQDI45HWNOAZHCDP3HSFRANCNFSM4HYVRXPA .

jeffreykemp commented 5 years ago

I've encountered the same issue - it happens because when APEX runs the On Initialization steps, the map hasn't yet loaded. Later, when the map loads, depending on how things have been configured the geolocate event can fire and your dynamic action will then work.

Cheers

jeffreykemp commented 5 years ago

Thanks for raising this issue, I've added a note to the Wiki to help future readers.

BizSafe commented 5 years ago

Thanks again for the awesome plugin and for the great support.

Hope you have a brilliant day

Sandy

On Wed, Jun 19, 2019 at 10:22 AM Jeffrey Kemp notifications@github.com wrote:

Thanks for raising this issue, I've added a note to the Wiki to help future readers.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jeffreykemp/jk64-plugin-reportmap/issues/60?email_source=notifications&email_token=AHUUSLWTWEOOBD73I2KFIWDP3HUC3A5CNFSM4HYVRXPKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYBC32A#issuecomment-503459304, or mute the thread https://github.com/notifications/unsubscribe-auth/AHUUSLQR2FMVIXIQ4BCO2DDP3HUC3ANCNFSM4HYVRXPA .