 ,p_event_id=>wwv_flow_api.id(24993474984616474803)
 ,p_event_result=>'TRUE'
 ,p_action_sequence=>10
-,p_execute_on_page_init=>'N'
+,p_execute_on_page_init=>'Y'
 ,p_action=>'NATIVE_JAVASCRIPT_CODE'
 ,p_attribute_01=>'$s("P1_INFO", "You clicked at: " + this.data.lat + "," + this.data.lng);'
+,p_stop_execution_on_error=>'Y'
+);
+end;
+/
+prompt --application/pages/page_00002
+begin
+wwv_flow_api.create_page(
+ p_id=>2
+,p_user_interface_id=>wwv_flow_api.id(24993449914929461841)
+,p_name=>'Demo - Simple Map Marker Info'
+,p_page_mode=>'NORMAL'
+,p_step_title=>'Demo - Simple Map Marker Info'
+,p_step_sub_title=>'Demo - Simple Map Marker Info'
+,p_step_sub_title_type=>'TEXT_WITH_SUBSTITUTIONS'
+,p_first_item=>'NO_FIRST_ITEM'
+,p_page_template_options=>'#DEFAULT#'
+,p_overwrite_navigation_list=>'N'
+,p_page_is_public_y_n=>'N'
+,p_cache_mode=>'NOCACHE'
+,p_help_text=>wwv_flow_utilities.join(wwv_flow_t_varchar2(
+'The region is synchronized with the P1_LAT_LONG item which has a static value (in your case, it could be based on a database item).',
+'<p>',
+'The map region has a static id = <code>map</code>.',
+'<p>',
+'There is a Dynamic Action on mapLoaded that executes the following:',
+'<pre>',
+'opt_map.iw = new google.maps.InfoWindow();',
+'opt_map.iw.setOptions({',
+'    content: $v("P2_INFO")',
+'});',
+'opt_map.iw.open(this.data.map, opt_map.marker);',
+'</pre>',
+'<p>',
+'This takes the value of the P2_INFO item and shows an InfoWindow at the marker position.',
+'',
+'The DA also runs this to disable zoom:',
+'<pre>',
+'this.data.map.setOptions({',
+'  draggable: false,',
+'  zoomControl: false,',
+'  scrollwheel: false,',
+'  disableDoubleClickZoom: true',
+'});',
+'</pre>'))
+,p_last_updated_by=>'JEFFREY.KEMP@JK64.COM'
+,p_last_upd_yyyymmddhh24miss=>'20160410131402'
+);
+wwv_flow_api.create_page_plug(
+ p_id=>wwv_flow_api.id(30097686398806071537)
+,p_plug_name=>'Marker has Info to show'
+,p_region_name=>'map'
+,p_region_template_options=>'#DEFAULT#:t-Region--scrollBody'
+,p_plug_template=>wwv_flow_api.id(24993423791104461805)
+,p_plug_display_sequence=>10
+,p_include_in_reg_disp_sel_yn=>'Y'
+,p_plug_display_point=>'BODY'
+,p_plug_item_display_point=>'BELOW'
+,p_plug_source_type=>'PLUGIN_COM.JK64.SIMPLE_GOOGLE_MAP'
+,p_plug_query_row_template=>1
+,p_plug_query_options=>'DERIVED_REPORT_COLUMNS'
+,p_plug_header=>'Source: <a href="https://bitbucket.org/jk64/jk64-plugin-simplemap">https://bitbucket.org/jk64/jk64-plugin-simplemap</a>'
+,p_attribute_01=>'0,0'
+,p_attribute_02=>'2'
+,p_attribute_03=>'350'
+,p_attribute_04=>'P2_LAT_LONG'
+,p_attribute_05=>'16'
+,p_attribute_07=>'N'
+);
+wwv_flow_api.create_page_plug(
+ p_id=>wwv_flow_api.id(30097687576104071539)
+,p_plug_name=>'Notes'
+,p_region_template_options=>'#DEFAULT#:t-Region--scrollBody'
+,p_component_template_options=>'#DEFAULT#'
+,p_plug_template=>wwv_flow_api.id(24993423791104461805)
+,p_plug_display_sequence=>20
+,p_include_in_reg_disp_sel_yn=>'Y'
+,p_plug_new_grid_row=>false
+,p_plug_display_point=>'BODY'
+,p_plug_source_type=>'NATIVE_HELP_TEXT'
+,p_plug_query_row_template=>1
+,p_plug_query_options=>'DERIVED_REPORT_COLUMNS'
+);
+wwv_flow_api.create_page_item(
+ p_id=>wwv_flow_api.id(30097686781317071538)
+,p_name=>'P2_INFO'
+,p_item_sequence=>10
+,p_item_plug_id=>wwv_flow_api.id(30097686398806071537)
+,p_prompt=>'P2_INFO'
+,p_source=>'Here is my Las Vegas marker info text'
+,p_source_type=>'STATIC'
+,p_display_as=>'NATIVE_DISPLAY_ONLY'
+,p_field_template=>wwv_flow_api.id(24993444268681461824)
+,p_item_template_options=>'#DEFAULT#'
+,p_attribute_01=>'N'
+,p_attribute_02=>'VALUE'
+,p_attribute_04=>'Y'
+);
+wwv_flow_api.create_page_item(
+ p_id=>wwv_flow_api.id(30097687110365071539)
+,p_name=>'P2_LAT_LONG'
+,p_item_sequence=>20
+,p_item_plug_id=>wwv_flow_api.id(30097686398806071537)
+,p_prompt=>'P2_LAT_LONG'
+,p_placeholder=>'lat,long'
+,p_source=>'36.17003115949951,-115.14392852783203'
+,p_source_type=>'STATIC'
+,p_display_as=>'NATIVE_TEXT_FIELD'
+,p_cSize=>30
+,p_field_template=>wwv_flow_api.id(24993444268681461824)
+,p_item_template_options=>'#DEFAULT#'
+,p_attribute_01=>'N'
+,p_attribute_02=>'N'
+,p_attribute_04=>'TEXT'
+,p_attribute_05=>'BOTH'
 );
 wwv_flow_api.create_page_da_event(
- p_id=>wwv_flow_api.id(70147833275519549)
-,p_name=>'map geolocate'
-,p_event_sequence=>20
+ p_id=>wwv_flow_api.id(24993475367633474807)
+,p_name=>'on map load'
+,p_event_sequence=>10
 ,p_triggering_element_type=>'REGION'
-,p_triggering_region_id=>wwv_flow_api.id(24993474756469474801)
+,p_triggering_region_id=>wwv_flow_api.id(30097686398806071537)
 ,p_bind_type=>'bind'
-,p_bind_event_type=>'PLUGIN_COM.JK64.SIMPLE_GOOGLE_MAP|REGION TYPE|geolocate'
+,p_bind_event_type=>'PLUGIN_COM.JK64.SIMPLE_GOOGLE_MAP|REGION TYPE|maploaded'
 );
 wwv_flow_api.create_page_da_action(
- p_id=>wwv_flow_api.id(70147922695519550)
-,p_event_id=>wwv_flow_api.id(70147833275519549)
+ p_id=>wwv_flow_api.id(24993475426072474808)
+,p_event_id=>wwv_flow_api.id(24993475367633474807)
 ,p_event_result=>'TRUE'
 ,p_action_sequence=>10
 ,p_execute_on_page_init=>'N'
 ,p_action=>'NATIVE_JAVASCRIPT_CODE'
-,p_attribute_01=>'click_mymap(this.data.lat,this.data.lng);'
+,p_attribute_01=>wwv_flow_utilities.join(wwv_flow_t_varchar2(
+'apex.debug("map loaded");',
+'opt_map.iw = new google.maps.InfoWindow();',
+'apex.debug("content="+$v("P2_INFO"));',
+'opt_map.iw.setOptions({',
+'    content: $v("P2_INFO")',
+'});',
+'apex.debug("show info window on map at marker");',
+'opt_map.iw.open(this.data.map, opt_map.marker);',
+'apex.debug("disable zoom");',
+'this.data.map.setOptions({draggable: false, zoomControl: false, scrollwheel: false, disableDoubleClickZoom: true});'))
 );
 end;
 /

wwv_flow_api.g_varchar2_table(4) := '74656D2626247328652E73796E634974656D2C6E2E6C617428292B222C222B6E2E6C6E672829297D656C736520617065782E646562756728652E726567696F6E49642B222067656F636F64652077617320756E7375636365737366756C20666F72207468';
wwv_flow_api.g_varchar2_table(5) := '6520666F6C6C6F77696E6720726561736F6E3A20222B61297D297D66756E6374696F6E206A6B3634706C7567696E5F7365744D61726B657228652C6F2C61297B6966286E756C6C213D3D6F26266E756C6C213D3D61297B766172206E3D652E6D61726B65';
wwv_flow_api.g_varchar2_table(6) := '723F652E6D61726B65722E676574506F736974696F6E28293A6E657720676F6F676C652E6D6170732E4C61744C6E6728302C30293B6966286F3D3D6E2E6C617428292626613D3D6E2E6C6E67282929617065782E646562756728652E726567696F6E4964';
wwv_flow_api.g_varchar2_table(7) := '2B22206D61726B6572206E6F74206368616E67656422293B656C73657B617065782E646562756728652E726567696F6E49642B22206D6F7665206D61726B657222293B76617220743D6E657720676F6F676C652E6D6170732E4C61744C6E67286F2C6129';
wwv_flow_api.g_varchar2_table(8) := '3B652E6D61702E70616E546F2874292C652E6D61726B65725A6F6F6D2626652E6D61702E7365745A6F6F6D28652E6D61726B65725A6F6F6D292C652E6D61726B65723F28652E6D61726B65722E7365744D617028652E6D6170292C652E6D61726B65722E';
wwv_flow_api.g_varchar2_table(9) := '736574506F736974696F6E287429293A652E6D61726B65723D6E657720676F6F676C652E6D6170732E4D61726B6572287B6D61703A652E6D61702C706F736974696F6E3A742C69636F6E3A652E69636F6E7D297D7D656C736520652E6D61726B65722626';
wwv_flow_api.g_varchar2_table(10) := '28617065782E646562756728652E726567696F6E49642B222072656D6F7665206D61726B657222292C652E6D61726B65722E7365744D6170286E756C6C29297D66756E6374696F6E206A6B3634706C7567696E5F6765744164647265737328652C6F2C61';
wwv_flow_api.g_varchar2_table(11) := '297B766172206E3D7B6C61743A6F2C6C6E673A617D3B652E67656F636F6465722E67656F636F6465287B6C6F636174696F6E3A6E7D2C66756E6374696F6E286F2C61297B696628613D3D3D676F6F676C652E6D6170732E47656F636F6465725374617475';
wwv_flow_api.g_varchar2_table(12) := '732E4F4B297B666F7228693D303B693C6F2E6C656E6774683B692B2B29617065782E646562756728652E726567696F6E49642B2220726573756C745B222B692B225D3D222B6F5B695D2E666F726D61747465645F616464726573732B222028222B6F5B69';
wwv_flow_api.g_varchar2_table(13) := '5D2E74797065732E6A6F696E28292B222922293B6F5B315D3F247328652E616464726573734974656D2C6F5B305D2E666F726D61747465645F61646472657373293A77696E646F772E616C6572742822496E73756666696369656E7420726573756C7473';
wwv_flow_api.g_varchar2_table(14) := '20666F756E6422297D656C736520613D3D3D676F6F676C652E6D6170732E47656F636F6465725374617475732E5A45524F5F524553554C54533F77696E646F772E616C65727428224E6F20726573756C747320666F756E6422293A77696E646F772E616C';
wwv_flow_api.g_varchar2_table(15) := '657274282247656F636F646572206661696C65642064756520746F3A20222B61297D297D66756E6374696F6E206A6B3634706C7567696E5F696E69744D61702865297B766172206F3D7B7A6F6F6D3A652E696E69745A6F6F6D2C63656E7465723A6E6577';
wwv_flow_api.g_varchar2_table(16) := '20676F6F676C652E6D6170732E4C61744C6E6728652E696E69744C61742C652E696E69744C6E67292C6D61705479706549643A676F6F676C652E6D6170732E4D61705479706549642E524F41444D41507D3B696628652E6D61703D6E657720676F6F676C';
wwv_flow_api.g_varchar2_table(17) := '652E6D6170732E4D617028646F63756D656E742E676574456C656D656E744279496428652E636F6E7461696E6572292C6F292C652E6D61707374796C652626652E6D61702E7365744F7074696F6E73287B7374796C65733A652E6D61707374796C657D29';
wwv_flow_api.g_varchar2_table(18) := '2C2222213D3D652E73796E634974656D297B76617220613D247628652E73796E634974656D293B6966286E756C6C213D3D612626612E696E6465784F6628222C22293E2D31297B766172206E3D612E73706C697428222C22293B6A6B3634706C7567696E';
wwv_flow_api.g_varchar2_table(19) := '5F7365744D61726B657228652C6E5B305D2C6E5B315D297D24282223222B652E73796E634974656D292E6368616E67652866756E6374696F6E28297B766172206F3D746869732E76616C75653B6966286E756C6C213D3D6F2626766F69642030213D3D6F';
wwv_flow_api.g_varchar2_table(20) := '26266F2E696E6465784F6628222C22293E2D31297B76617220613D6F2E73706C697428222C22293B6A6B3634706C7567696E5F7365744D61726B657228652C615B305D2C615B315D297D7D297D6966282222213D3D652E616464726573734974656D2626';
wwv_flow_api.g_varchar2_table(21) := '28652E67656F636F6465723D6E657720676F6F676C652E6D6170732E47656F636F646572292C676F6F676C652E6D6170732E6576656E742E6164644C697374656E657228652E6D61702C22636C69636B222C66756E6374696F6E286F297B76617220613D';
wwv_flow_api.g_varchar2_table(22) := '6F2E6C61744C6E672E6C617428292C6E3D6F2E6C61744C6E672E6C6E6728293B6A6B3634706C7567696E5F7365744D61726B657228652C612C6E292C2222213D3D652E73796E634974656D2626247328652E73796E634974656D2C612B222C222B6E292C';
wwv_flow_api.g_varchar2_table(23) := '2222213D3D652E616464726573734974656D26266A6B3634706C7567696E5F6765744164647265737328652C612C6E292C617065782E6A5175657279282223222B652E726567696F6E4964292E7472696767657228226D6170636C69636B222C7B6D6170';
wwv_flow_api.g_varchar2_table(24) := '3A652E6D61702C6C61743A612C6C6E673A6E7D297D292C2222213D652E67656F636F64654974656D297B76617220743D6E657720676F6F676C652E6D6170732E47656F636F6465723B24282223222B652E67656F636F64654974656D292E6368616E6765';
wwv_flow_api.g_varchar2_table(25) := '2866756E6374696F6E28297B6A6B3634706C7567696E5F67656F636F646528652C74297D297D652E67656F6C6F636174652626286E6176696761746F722E67656F6C6F636174696F6E3F28617065782E646562756728652E726567696F6E49642B222067';
wwv_flow_api.g_varchar2_table(26) := '656F6C6F6361746522292C6E6176696761746F722E67656F6C6F636174696F6E2E67657443757272656E74506F736974696F6E2866756E6374696F6E286F297B76617220613D7B6C61743A6F2E636F6F7264732E6C617469747564652C6C6E673A6F2E63';
wwv_flow_api.g_varchar2_table(27) := '6F6F7264732E6C6F6E6769747564657D3B652E6D61702E70616E546F2861292C652E67656F6C6F636174655A6F6F6D2626652E6D61702E7365745A6F6F6D28652E67656F6C6F636174655A6F6F6D292C617065782E6A5175657279282223222B652E7265';
wwv_flow_api.g_varchar2_table(28) := '67696F6E4964292E74726967676572282267656F6C6F63617465222C7B6D61703A652E6D61702C6C61743A612E6C61742C6C6E673A612E6C6E677D297D29293A617065782E646562756728652E726567696F6E49642B222062726F7773657220646F6573';
wwv_flow_api.g_varchar2_table(29) := '206E6F7420737570706F72742067656F6C6F636174696F6E2229292C617065782E6A5175657279282223222B652E726567696F6E4964292E7472696767657228226D61706C6F61646564222C7B6D61703A652E6D61707D297D';
null;
end;
/

,p_is_translatable=>false
,p_help_text=>'Google API Key required. When the user clicks a point on the map, a Google Maps reverse geocode will be executed and the first result (usually the address) will be copied to the item you specify here.'
);
wwv_flow_api.create_plugin_event(
 p_id=>wwv_flow_api.id(367705867256739548)
,p_plugin_id=>wwv_flow_api.id(367692204487310457)
