{"id":18451,"date":"2021-09-29T13:23:13","date_gmt":"2021-09-29T13:23:13","guid":{"rendered":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/ajax-map\/"},"modified":"2021-09-29T13:23:13","modified_gmt":"2021-09-29T13:23:13","slug":"ajax-map","status":"publish","type":"page","link":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/ajax-map\/","title":{"rendered":"AJAX Map"},"content":{"rendered":"<div class=\"w2gm-demo-prev-next-demos\">\r\n\t<span class=\"w2gm-demo-prev-demo\">Prev demo: <a href=\"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/markers-of-one-category\/\">Markers of One Category<\/a><\/span>\r\n\t<span class=\"w2gm-demo-next-demo\">Next demo: <a href=\"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/directions\/\">Directions<\/a><\/span>\r\n<\/div>\n<p>Display all existing markers using AJAX loading, start from Los Angeles, USA.<\/p>\n<p>Main feature of this page: the map loads only needed map markers, those visible in the viewport of the map. Each drag or zoom changing of the map loads new markers. This effect due to ajax_loading=1 parameter in the map shortcode. ajax_markers_loading=1 parameter gives an ability to load marker info window after the click on marker. All these effects give increase of performance and allow to process thousands of markers.<\/p>\n<div class=\"w2gm-content\">\r\n\t<script>\r\n\t\tw2gm_map_markers_attrs_array.push(new w2gm_map_markers_attrs('1c1bef0d7c1231fff2837aeca9faca4e', eval([]), {\"num\":\"\",\"width\":\"\",\"height\":650,\"radius_circle\":0,\"clusters\":0,\"sticky_scroll\":0,\"sticky_scroll_toppadding\":0,\"show_directions_button\":1,\"directions_sidebar_open\":0,\"show_readmore_button\":1,\"ajax_loading\":1,\"ajax_markers_loading\":1,\"optimize_ajax_loading\":1,\"use_ajax_loader\":0,\"counter\":1,\"counter_text\":\"Number of locations %d\",\"geolocation\":0,\"start_address\":\"\",\"start_latitude\":34.05435721823217676273998222313821315765380859375,\"start_longitude\":-118.2156067968750221552909351885318756103515625,\"start_zoom\":10,\"min_zoom\":0,\"max_zoom\":0,\"enable_infowindow\":1,\"close_infowindow_out_click\":1,\"map_style\":\"\",\"include_categories_children\":0,\"search_on_map\":0,\"search_on_map_id\":\"\",\"search_on_map_open\":0,\"search_on_map_right\":0,\"search_on_map_listings\":\"none\",\"order_by\":\"post_date\",\"order\":\"DESC\",\"radius\":\"\",\"draw_panel\":0,\"author\":\"\",\"enable_full_screen\":1,\"enable_full_screen_by_default\":0,\"enable_wheel_zoom\":1,\"enable_dragging_touchscreens\":1,\"enable_onefinger_dragging_touchscreens\":0,\"center_map_onclick\":0,\"zoom_map_onclick\":0,\"categories\":\"\",\"locations\":\"\",\"tags\":\"\",\"ratings\":\"\",\"uid\":\"\",\"post__in\":\"\",\"test_number\":\"\",\"phone\":\"\",\"event_date_min\":\"\",\"event_date_max\":\"\",\"additional_description\":\"\",\"price\":\"\",\"use_starting_point\":1,\"id\":\"AJAX Map\",\"map_post_id\":18470}));\r\n\r\n\t\t\t<\/script>\r\n\t\t\r\n\t<div id=\"w2gm-map-wrapper-1c1bef0d7c1231fff2837aeca9faca4e\" class=\"w2gm-content w2gm-map-wrapper\" style=\" height: 652px;\" data-id=\"1c1bef0d7c1231fff2837aeca9faca4e\" >\r\n\t\t<div class=\"w2gm-map-directions-sidebar\" id=\"w2gm-map-directions-sidebar-1c1bef0d7c1231fff2837aeca9faca4e\">\r\n\t<div class=\"w2gm-map-directions-panel\">\r\n\t\t<div class=\"w2gm-form-group\">\r\n\t\t\t<div class=\"w2gm-has-feedback\">\r\n\t\t\t\t<input name=\"address_a\" value=\"\" placeholder=\"Enter origin address\" class=\"w2gm-form-control w2gm-directions-address w2gm-directions-address-a w2gm-field-autocomplete\" autocomplete=\"off\" \/>\r\n\t\t\t\t\t\t\t\t<span class=\"w2gm-get-location w2gm-form-control-feedback w2gm-glyphicon w2gm-glyphicon-screenshot\"><\/span>\r\n\t\t\t\t\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t<div class=\"w2gm-form-group\">\r\n\t\t\t<div class=\"w2gm-has-feedback\">\r\n\t\t\t\t<input name=\"listing_title\" value=\"\" placeholder=\"Select distination on the map\" class=\"w2gm-form-control w2gm-directions-address w2gm-directions-listing-title\" autocomplete=\"off\" readonly=\"readonly\" \/>\r\n\t\t\t\t<input type=\"hidden\" name=\"destination_coords\" value=\"\" class=\"w2gm-form-control w2gm-directions-address w2gm-directions-address-b\" \/>\r\n\t\t\t\t<span class=\"w2gm-dropdowns-menu-button w2gm-form-control-feedback w2gm-glyphicon w2gm-glyphicon-map-marker\"><\/span>\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t<div class=\"w2gm-form-group w2gm-map-directions-sidebar-buttons w2gm-clearfix\">\r\n\t\t\t<a href=\"javascript:void(0);\" class=\"w2gm-btn w2gm-btn-primary w2gm-map-directions-sidebar-close-button\" data-id=\"1c1bef0d7c1231fff2837aeca9faca4e\">Close<\/a>\r\n\t\t\t<a href=\"javascript:void(0);\" class=\"w2gm-btn w2gm-btn-primary w2gm-map-directions-sidebar-get-button\" data-id=\"1c1bef0d7c1231fff2837aeca9faca4e\">Get directions<\/a>\r\n\t\t<\/div>\r\n\t\t<div id=\"w2gm-route-container-1c1bef0d7c1231fff2837aeca9faca4e\" class=\"w2gm-route-container\">\r\n\t\t\t<p class=\"w2gm-route-container-description\">Click 'Directions' button in selected location, enter origin address or use 'My location' button, then click 'Get directions' button.<\/p>\r\n\t\t<\/div>\r\n\t<\/div>\r\n<\/div>\t\t\r\n\t\t<div id=\"w2gm-map-canvas-wrapper-1c1bef0d7c1231fff2837aeca9faca4e\" class=\"w2gm-map-canvas-wrapper\" data-height=\"650\" >\r\n\t\t\t<div id=\"w2gm-map-canvas-1c1bef0d7c1231fff2837aeca9faca4e\" class=\"w2gm-map-canvas\" data-shortcode-hash=\"1c1bef0d7c1231fff2837aeca9faca4e\" style=\" height: 650px;\" ><\/div>\r\n\t\t<\/div>\r\n\t\t\r\n\t\t\t<\/div>\r\n\t\t\r\n\t\t\r\n\t<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Display all existing markers using AJAX loading, start from Los Angeles, USA. Main feature of this page: the map loads only needed map markers, those visible in the viewport of the map. Each drag or zoom changing of the map loads new markers. This effect due to ajax_loading=1 parameter in the map shortcode. ajax_markers_loading=1 parameter [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-18451","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/wp-json\/wp\/v2\/pages\/18451","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/wp-json\/wp\/v2\/comments?post=18451"}],"version-history":[{"count":0,"href":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/wp-json\/wp\/v2\/pages\/18451\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.salephpscripts.com\/wordpress_maps\/demo\/wp-json\/wp\/v2\/media?parent=18451"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}