Generating random locations nearby my location in PHP and MySQL

I'm using a method to generate a random locations around my location with given the initial position(lat,long) and radius this method is used From the reference post here, but unfortunately the random locations not generated and display on Google Maps. In my code I had passed the value of lat and long of initial position and given radius around 100 meter around. The code as shown below. It seems I've missed some point in the code.

The code in PHP

var lat=40.744656;
var long=-74.005966;
var southWest = new google.maps.LatLng(lat,long );
var r = 100/111300 // = 100 meters
, y0 = lat
, x0 = long
, u = Math.random()
, v = Math.random()
, w = r * Math.sqrt(u)
, t = 2 * Math.PI * v
, x = w * Math.cos(t)
, y1 = w * Math.sin(t)
, x1 = x / Math.cos(y0)
newY = y0 + y1
newX = x0 + x1
// set multiple marker
for (var i = 0; i < 20; i++) {
// init markers
var marker = new google.maps.Marker({
position: new google.maps.LatLng(newY, newX ),
map: map,
title: 'Click Me ' + i
});
• Please Edit the question to contain sufficient details to be answered without following the link. – Vince Jun 7 at 10:54
• sure sir, the link is reference to another post thats why i mention it. thx u – john Jun 7 at 12:23
{"ft_lang_label":"__label__en","ft_lang_prob":0.7431174,"math_prob":0.97211605,"size":975,"snap":"2019-43-2019-47","text_gpt3_token_len":283,"char_repetition_ratio":0.104016475,"word_repetition_ratio":0.0,"special_character_ratio":0.35384616,"punctuation_ratio":0.19545455,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98708475,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-10-14T11:45:44Z\",\"WARC-Record-ID\":\"<urn:uuid:8b1864a6-11fb-4051-b117-ddb9fdfdce09>\",\"Content-Length\":\"132355\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:d0413ed0-82ab-47d4-a2d5-6f7b299eae0e>\",\"WARC-Concurrent-To\":\"<urn:uuid:1d4ca570-b35c-455a-8fd6-d2ca478ec6a9>\",\"WARC-IP-Address\":\"151.101.1.69\",\"WARC-Target-URI\":\"https://gis.stackexchange.com/questions/325126/generating-random-locations-nearby-my-location-in-php-and-mysql\",\"WARC-Payload-Digest\":\"sha1:4CAKF4JRKB3VHOJG2K46C6S64VW3EDIK\",\"WARC-Block-Digest\":\"sha1:VZCGLKJQM77WF65P43RYNQPEQ6XAP7ZB\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-43/CC-MAIN-2019-43_segments_1570986653216.3_warc_CC-MAIN-20191014101303-20191014124303-00214.warc.gz\"}"}