 '    ',
 '    l_script := REPLACE(''',
 'var opt_#REGION# = {',
-'   container: "map_#REGION#_container"',
-'  ,regionId: "#REGION#"',
-'  ,initZoom: ''||l_zoom||''',
-'  ,initLat: ''||TO_CHAR(l_lat,''fm999.9999999999999999'')||''',
-'  ,initLng: ''||TO_CHAR(l_lng,''fm999.9999999999999999'')||''',
+'   container:  "map_#REGION#_container"',
+'  ,regionId:   "#REGION#"',
+'  ,initZoom:   ''||l_zoom||''',
+'  ,initLat:    ''||TO_CHAR(l_lat,''fm999.9999999999999999'')||''',
+'  ,initLng:    ''||TO_CHAR(l_lng,''fm999.9999999999999999'')||''',
 '  ,markerZoom: ''||l_marker_zoom||''',
-'  ,icon: "''||l_icon||''"',
-'  ,syncItem: "''||l_item_name||''"',
-'  ,geocodeItem: "''||l_geocode_item||''"',
-'  ,country: "''||l_country||''"''||',
+'  ,icon:       "''||l_icon||''"',
+'  ,syncItem:   "''||l_item_name||''"',
+'  ,geocodeItem:"''||l_geocode_item||''"',
+'  ,country:    "''||l_country||''"''||',
 '  CASE WHEN l_mapstyle IS NOT NULL THEN ''',
-'  ,mapstyle: ''||l_mapstyle',
-'  END || ''',
-'  ,addressItem: "''||l_address_item||''"''||',
-'  CASE WHEN l_geolocate = ''Y'' THEN ''',
-'  ,geolocate: true'' ||',
-'    CASE WHEN l_geoloc_zoom IS NOT NULL THEN ''',
-'  ,geolocateZoom: ''||l_geoloc_zoom',
-'    END',
-'  END || ''',
+'  ,mapstyle:       ''||l_mapstyle END || ''',
+'  ,addressItem:"''||l_address_item||''"',
 '};',
 'function r_#REGION#(f){/in/.test(document.readyState)?setTimeout("r_#REGION#("+f+")",9):f()}',
 'r_#REGION#(function(){',
 '  jk64plugin_initMap(opt_#REGION#);',
 '});',
-'function click_#REGION#(lat,lng) {',
-'  jk64plugin_setMarker(opt_#REGION#,lat,lng);',
-'}',
 ''',''#REGION#'',l_region);',
 '',
 '  sys.htp.p(''<script>''||l_script||''</script>'');',

,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_attribute(
 p_id=>wwv_flow_api.id(82030436997318239)
,p_plugin_id=>wwv_flow_api.id(367692204487310457)
,p_attribute_scope=>'COMPONENT'
,p_attribute_sequence=>12
,p_display_sequence=>120
,p_prompt=>'Geolocate'
,p_attribute_type=>'CHECKBOX'
,p_is_required=>false
,p_default_value=>'N'
,p_is_translatable=>false
,p_help_text=>'If Yes, on load the map will attempt to locate the user''s position and pan&zoom to that location (it might prompt the user for permission first).'
);
wwv_flow_api.create_plugin_attribute(
 p_id=>wwv_flow_api.id(82032038134389504)
,p_plugin_id=>wwv_flow_api.id(367692204487310457)
,p_attribute_scope=>'COMPONENT'
,p_attribute_sequence=>13
,p_display_sequence=>130
,p_prompt=>'Zoom on Geolocate'
,p_attribute_type=>'INTEGER'
,p_is_required=>false
,p_default_value=>'13'
,p_display_length=>2
,p_max_length=>2
,p_unit=>'(0-23)'
,p_is_translatable=>false
,p_depending_on_attribute_id=>wwv_flow_api.id(82030436997318239)
,p_depending_on_condition_type=>'EQUALS'
,p_depending_on_expression=>'Y'
,p_help_text=>'If geolocation is successful, pan map and zoom to this level.'
);
wwv_flow_api.create_plugin_event(
 p_id=>wwv_flow_api.id(82033606956406541)
,p_plugin_id=>wwv_flow_api.id(367692204487310457)
,p_name=>'geolocate'
,p_display_name=>'geolocate'
);
wwv_flow_api.create_plugin_event(
 p_id=>wwv_flow_api.id(367705867256739548)
,p_plugin_id=>wwv_flow_api.id(367692204487310457)

begin
wwv_flow_api.import_begin (
 p_version_yyyy_mm_dd=>'2013.01.01'
,p_release=>'5.0.3.00.03'
,p_default_workspace_id=>69160808430820669492
,p_default_application_id=>76577
,p_default_owner=>'JK64'
);
end;
/
