{"id":521,"date":"2020-06-29T14:02:08","date_gmt":"2020-06-29T19:02:08","guid":{"rendered":"https:\/\/saddlebackpro.com\/?page_id=521"},"modified":"2022-03-14T11:09:12","modified_gmt":"2022-03-14T16:09:12","slug":"test-page","status":"publish","type":"page","link":"https:\/\/saddlebackpro.com\/es\/test-page\/","title":{"rendered":"P\u00e1gina de prueba"},"content":{"rendered":"<section class=\"section_padding\">\n\t<h1 class=\"align_middle\">hello<\/h1>\n\t\n\t<p>this is our test page.<\/p>\n<p><a href=\"https:\/\/saddlebackpro.com\/contact\/\">contact us<\/a><\/p>\n<\/section>\n\n\n\n<section class=\"section_padding\">\n    <div>\n\t\t<h2>Help File<\/h2>\n        <div class = \"accordion\" id = \"accordion\">\n                            <h4 class = \"accordion-toggle\"><i class=\"fas fa-plus\" aria-hidden=\"true\"><\/i>when do i pay rent?<\/h4>\n                <div class = \"accordion-content\">\n                    <p>today<\/p>\n                <\/div>\n                            <h4 class = \"accordion-toggle\"><i class=\"fas fa-plus\" aria-hidden=\"true\"><\/i>Who do I contact with questions?<\/h4>\n                <div class = \"accordion-content\">\n                    <p>use the contact form.<\/p>\n                <\/div>\n                    <\/div>\n    <\/div>\n    <\/section>\n\n\n\n<div class = \"loader\" style = \"display: none;\"><\/div>\r\n<script type=\"text\/javascript\">\r\n\tjQuery('.loader').show();\r\n\tjQuery(document).ready(function() {\r\n\t\tjQuery('.loader').hide();\r\n\t});\r\n<\/script>\r\n<!--Map Begin-->\r\n<script src=\"https:\/\/maps.googleapis.com\/maps\/api\/js?key=AIzaSyAurE2IQIEY0E0J_-841wUWh_xCLem_jgo\"><\/script>\r\n\r\n\t<script>\r\n\r\n\t\t\/\/This is our map object. We declare this stuff here so we can always access it\r\n\t    var map;\r\n\r\n\t\t\/\/This will be a Google object that represents 2 opposite corners of our map\r\n\t\t\/\/We can extend the bounds around our markers automatically and Google will zoom us out\r\n\t\tvar bounds;\r\n\r\n\t\t\/\/This will be an array that holds are markers. It's not necessary strictly speaking if\r\n\t\t\/\/you are only going to be interacting with the markers by the user clicking on them.\r\n\t\t\/\/But if you want to be able to programmatically remove, filter, etc. then this is the way\r\n\t\tvar markers = [];\r\n\r\n\t\t\/\/This is a reusable infowindow bubble that all the markers will share and populate\r\n\t\t\/\/Yeah...it gets around\r\n\t\tvar infoWindow;\r\n\r\n\t\t\/\/This array will hold all of our unit data, so we can populate map popup windows\r\n\t\tvar arrayOfProperties = [];\r\n\t\tvar arrayOfAddresses = [];\r\n        var arrayOfPropName = [];\r\n\t\tvar arrayOfImages = [];\r\n\t\tvar arrayOfPropType = [];\r\n\t\tvar arrayOfMapLocation = [];\r\n\t\tvar myGeocacher;\r\n\t\tjQuery(document).ready(function(){\r\n\r\n\t\t\t\/\/Go get our data once the page is ready.\r\n\r\n\r\n\t\t\tjQuery( '.property:visible' ).each( function(){\r\n\r\n\t\t\t\t\t\t\/\/Looping through each unit and extracting its data attributes\r\n\t\t\t\t\t\tvar thisAddress = jQuery( this ).data( 'address' );\r\n                        var thisPropName = jQuery( this ).data( 'propname' );\r\n\t\t\t\t\t\tvar thisPropertyID = jQuery( this ).data( 'propertyid' );\r\n\t\t\t\t\t\tvar thisImage = jQuery( this ).data('mainimg');\r\n\t\t\t\t\t\tvar thisMapLocation = jQuery( this ).data('maplocation');\r\n\t\t\t\t\t\t\/\/Storing all of this unit's data in an object\r\n\t\t\t\t\t\tvar thisProperty = {\r\n\t\t\t\t\t\t\t               'address' : thisAddress,\r\n                                            'propname' : thisPropName,\r\n\t\t\t\t\t\t                   'propertyid' : thisPropertyID,\r\n\t\t\t\t\t\t\t\t\t\t\t'mainImg' : thisImage,\r\n\t\t\t\t\t\t\t\t\t\t\t'maplocation' : thisMapLocation\r\n\t\t\t\t\t\t};\r\n\r\n\t\t\t\t\t\t\/\/Lets make sure this unit has a real address in it\r\n\t\t\t\t\t\tif ( validAddress( thisAddress ) ){\r\n\r\n\t\t\t\t\t\t\t\/\/Storing this address in our array of addresses (for geocoding)\r\n\t\t\t\t\t\t\tarrayOfAddresses.push( thisAddress );\r\n\r\n\t\t\t\t\t\t\t\/\/Storing this unit's object in our array of unit objects (for infowindow etc.)\r\n\t\t\t\t\t\t\tarrayOfProperties.push( thisProperty );\r\n\t\t\t\t\t\t\tarrayOfImages.push( thisImage );\r\n\t\t\t\t\t\t\tarrayOfMapLocation.push ( thisMapLocation );\r\n\t\t\t\t\t\t}\r\n\t\t\t});\r\n\t\t\tmyGeocacher = geocacher( arrayOfAddresses );\r\n\t\t\tmyGeocacher.ready( function(){\r\n\r\n\t\t\t\t\t\t\t\/\/Here is the function (i.e. block of code) we want to be run when the addresses are all ready\r\n\t\t\t\t\t\t\t\/\/Ready means they've been fetched from the database or from google if necessary\r\n\t\t\t\t\t\t\t\/\/They now have the latitude and longitude on them\r\n\t\t\t\t\t\t\tfor( var i = 0; i < arrayOfProperties.length; i++ ){\r\n\r\n\t\t\t\t\t\t\t\t\/\/We ask the geocacher for the lat\/lng of each address in turn\r\n\t\t\t\t\t\t\t\t\/\/The addresses we ask for here MUST match the ones we asked it to geocode, so use the same source\r\n\t\t\t\t\t\t\t\t\/\/If you use any conditionals (i.e. filtering out blank addresses) make sure you filter both sets of data\r\n\t\t\t\t\t\t\t\tvar thisLatLng = myGeocacher.getLatLng( arrayOfProperties[i]['address'] );\r\n\r\n\t\t\t\t\t\t\t\t\/\/Now we supplement our unit object with the lat\/lng we just got\r\n\t\t\t\t\t\t\t\tarrayOfProperties[i].lat = thisLatLng.lat;\r\n\t\t\t\t\t\t\t\tarrayOfProperties[i].lng = thisLatLng.lng;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\/\/At this point here, all of the units have been supplemented with their coordinates\r\n\t\t\t\t\t\t\t\/\/This is a great place to actually call the function that will populate the map markers\r\n\t\t\t\t\t\t\tpopulateMarkers();\r\n\t\t\t\t\t\t\t});\r\n\t\t\tinitializeMap();\r\n\t\t});\r\n\r\n\t\t\t\t\/\/This function builds the map\r\n\t\tfunction initializeMap() {\r\n\r\n\t\t\t\/\/Starting coordinates for the center of the map, manually found via Google maps or one of the addresses\r\n\t\t\t\/\/ !!!!\r\n\t\t\t\/\/ UPDATE THIS WITH A GOOD CENTER FOR YOUR PROJECT\r\n\t\t\t\/\/ !!!!\r\n\t\t\tvar initialCenter = new google.maps.LatLng( { lat: 33.482750, lng: -117.715340 } );\r\n\r\n\t\t\t\/\/Set the bounds to be right on top of the one center point, just to start\r\n\t\t\tbounds = new google.maps.LatLngBounds( initialCenter, initialCenter );\r\n\r\n\t\t\t\/\/Initialize the reusable infoWindow\r\n\t\t\tinfoWindow = new google.maps.InfoWindow({});\r\n\r\n\t\t\t\/\/Initial map settings. Any styles? they'll go in here, too.\r\n\t\t\tvar mapOptions = {\r\n\t\t\t\t\tmapTypeId: 'roadmap',\r\n\t\t\t\t\tzoom: 9,\r\n\t\t\t\t\tcenter: initialCenter,\r\n\t\t\t\t\tstyles: []\r\n\t\t\t};\r\n\r\n\t\t\t\/\/Draw the map on the page\r\n\t\t\tmap = new google.maps.Map(document.getElementById(\"map-canvas-communities\"), mapOptions);\r\n\t\t}\r\n\r\n\t\t\/\/This function loops through the finished unit object array and ask for them to be put on the map\r\n\t\tfunction populateMarkers() {\r\n\t\t\tfor( var i = 0; i < arrayOfProperties.length; i++ ){\r\n\t\t\t\taddMarker( arrayOfProperties[i] );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t\/\/This function puts a single marker on the map\r\n\t\tfunction addMarker( propertyObject ) {\r\n\r\n\t\t\t\/\/Throughout here we will unpack what we need from the propertyObject we passed in\r\n\t\t\tvar thisLatLng = new google.maps.LatLng( propertyObject.lat, propertyObject.lng );\r\n\r\n            \/\/pull proptype to determine which map icon should display\r\n                var proptype = propertyObject.proptype;\r\n                var newIcon = 'https:\/\/saddlebackpro.com\/wp-content\/themes\/sbvc\/assets\/images\/MapMarker.png';\r\n\r\n\r\n\t\t\t\/\/Make the initial marker\r\n\t\t\tvar marker = new google.maps.Marker( {\r\n\t\t        position: thisLatLng,\r\n\t\t\t\ticon: {url: newIcon},\r\n\t\t        map: map,\r\n\t\t        title: propertyObject.address,\r\n                name: propertyObject.propname,\r\n        \t\tpropertyid: propertyObject.propertyid,\r\n\t\t\t\tmainimg: propertyObject.mainimg,\r\n\t\t\t\tmaplocation: propertyObject.maplocation\r\n\r\n\t    \t} );\r\n\t\t\/\/Extend  the map to make sure it covers this marker\r\n\t\t\t  bounds.extend( thisLatLng );\r\n\t\t\t  map.fitBounds( bounds );\r\n    \tvar contentString =\t'<div class=\"map-property-detail\"> \\\r\n\t\t\t\t<a href = \"\/property-detail\/?propid=' + propertyObject.propertyid + '\"><img decoding=\"async\" src=\"' + propertyObject.mainImg + '\" style=\"width:165px;\"><p> <span style=\"font-weight:bold;text-transform:uppercase;\";>' + propertyObject.propname + '<\/span><br\/>' + propertyObject.address + ' <\/p><\/a> \\\r\n\t\t\t  <\/div>';\r\n\r\n\t\t\t\/\/Add a listener to open the infowindow with this content when this marker is clicked\r\n      marker.addListener( 'click', function(){\r\n          infoWindow.setContent( contentString );\r\n          infoWindow.open( map, marker );\r\n      });\r\n\r\n\t\t\t\/\/push marker to markers array for later manipulation if necessary\r\n\t\t\tmarkers.push( marker );\r\n\r\n\t\t}\r\n\r\n\r\n\t\tfunction validAddress ( address ) {\r\n\t\t\t\/\/for now, just making sure it is numbers, then a space, then something else (street), a space, something else (city), a space, something else(state), space, then ending with numbers (zip)\r\n\t\t\treturn address.match( \/[0-9]+[ ]+.+[ ]+.+[ ]+.+[ ]+[0-9]+\/g );\r\n\t\t}\r\n\r\n\t\tjQuery(document).ready(function( $ ) {\r\n\t\tfunction showOnMap( propertyid){\r\n\r\n\t\t\tfor ( var i = 0; i < markers.length; i++ ){\r\n\r\n\t\t\t\t\/\/Find the matching marker based on unitid\r\n\t\t\t\tif ( markers[i].get( 'propertyid' ) == propertyid ){\r\n\r\n\t\t\t\t\t\/\/Scroll up to map\r\n\t\t\t\t\t$( 'html, body' ).animate( {\r\n\t\t\t\t\t\t\t\tscrollTop: $( '#map-canvas-communities' ).offset()\r\n\t\t\t\t\t\t} );\r\n\r\n\t\t\t\t\t\/\/Trigger infowindow click\r\n\t\t\t\t\tgoogle.maps.event.trigger( markers[i], 'click' );\r\n\r\n\t\t\t\t\t\/\/Break out of loop by setting end condition\r\n\t\t\t\t\ti = markers.length;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tjQuery( 'body' ).on( 'click', '.js-show-on-map', function(){\r\n\t\t\tshowOnMap( jQuery( this ).parent().parent().data( 'propertyid' ) );\r\n\t\t});\r\n});\r\n\t\t<\/script>\r\n<!--Map Code End-->\r\n<div class=\"two_col property_container\">\r\n                <div> We currently do not have any properties available. Please contact us for more information.<\/div>\r\n        <\/div>\r\n\t<div class=\"map_container\">\r\n\t\t\t<div id=\"map-canvas-communities\"><\/div>\r\n\t<\/div>\r\n<\/div>\r\n<section class=\"background_ltgray section_padding align_middle\">\r\n\t<h2 class=\"text_bold\">View What's Available in Our RV Communities<\/h2>\r\n\t<h4>Find your next home with us today!<\/h4>\r\n\t<a href=\"https:\/\/www.campspot.com\/book\/foothillsmobilehomeandrvpark\" class=\"button_red\" target=\"_blank\">Availability Listing<\/a>\r\n<\/section>\r\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-521","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Test Page - Saddleback Valley Communities<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/saddlebackpro.com\/es\/test-page\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Test Page - Saddleback Valley Communities\" \/>\n<meta property=\"og:url\" content=\"https:\/\/saddlebackpro.com\/es\/test-page\/\" \/>\n<meta property=\"og:site_name\" content=\"Saddleback Valley Communities\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-14T16:09:12+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/saddlebackpro.com\\\/test-page\\\/\",\"url\":\"https:\\\/\\\/saddlebackpro.com\\\/test-page\\\/\",\"name\":\"Test Page - Saddleback Valley Communities\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/saddlebackpro.com\\\/#website\"},\"datePublished\":\"2020-06-29T19:02:08+00:00\",\"dateModified\":\"2022-03-14T16:09:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/saddlebackpro.com\\\/test-page\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/saddlebackpro.com\\\/test-page\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/saddlebackpro.com\\\/test-page\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/saddlebackpro.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Test Page\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/saddlebackpro.com\\\/#website\",\"url\":\"https:\\\/\\\/saddlebackpro.com\\\/\",\"name\":\"Saddleback Valley Communities\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/saddlebackpro.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Test Page - Saddleback Valley Communities","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/saddlebackpro.com\/es\/test-page\/","og_locale":"es_ES","og_type":"article","og_title":"Test Page - Saddleback Valley Communities","og_url":"https:\/\/saddlebackpro.com\/es\/test-page\/","og_site_name":"Saddleback Valley Communities","article_modified_time":"2022-03-14T16:09:12+00:00","twitter_card":"summary_large_image","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/saddlebackpro.com\/test-page\/","url":"https:\/\/saddlebackpro.com\/test-page\/","name":"Test Page - Saddleback Valley Communities","isPartOf":{"@id":"https:\/\/saddlebackpro.com\/#website"},"datePublished":"2020-06-29T19:02:08+00:00","dateModified":"2022-03-14T16:09:12+00:00","breadcrumb":{"@id":"https:\/\/saddlebackpro.com\/test-page\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/saddlebackpro.com\/test-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/saddlebackpro.com\/test-page\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/saddlebackpro.com\/"},{"@type":"ListItem","position":2,"name":"Test Page"}]},{"@type":"WebSite","@id":"https:\/\/saddlebackpro.com\/#website","url":"https:\/\/saddlebackpro.com\/","name":"Comunidades de Saddleback Valley","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/saddlebackpro.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"}]}},"_links":{"self":[{"href":"https:\/\/saddlebackpro.com\/es\/wp-json\/wp\/v2\/pages\/521","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/saddlebackpro.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/saddlebackpro.com\/es\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/saddlebackpro.com\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/saddlebackpro.com\/es\/wp-json\/wp\/v2\/comments?post=521"}],"version-history":[{"count":10,"href":"https:\/\/saddlebackpro.com\/es\/wp-json\/wp\/v2\/pages\/521\/revisions"}],"predecessor-version":[{"id":606,"href":"https:\/\/saddlebackpro.com\/es\/wp-json\/wp\/v2\/pages\/521\/revisions\/606"}],"wp:attachment":[{"href":"https:\/\/saddlebackpro.com\/es\/wp-json\/wp\/v2\/media?parent=521"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}