is there a way to show latest date of a map on maps using google maps api?

`I want to show the date of imagery of the particular address using google maps API? is there any date method or property for getting date from this google maps API?

function initMap(address1) { showAjaxLoader();
var geocoder = new google.maps.Geocoder();
var address = address1;
var latitude;
var longitude;
if (address != "") {
    geocoder.geocode({ 'address': address }, function (results, status) {
        if (status == google.maps.GeocoderStatus.OK) {
            latitude = results[0].geometry.location.lat();
            longitude = results[0].geometry.location.lng();
            moveToGoogleMaps(latitude, longitude, address);
            GetFindImageInfo(latitude, longitude);
            GetPropertyInfo(latitude, longitude);
            //GetDamage(latitude, longitude);
        }
    });
}
hideAjaxLoader();
}

   function moveToGoogleMaps(latitude, longitude, address) { 

setTimeout(() => { const latlongs = { lat: latitude, lng: longitude };
 
const map = new google.maps.Map(document.getElementById("map"), { zoom: 20, center: latlongs, mapTypeId: 'satellite' }); 
 
const marker = new google.maps.Marker({ position: latlongs, map: map, date: });

 // Add event listener for marker hover
    marker.addListener('mouseover', () => {
        // Create info window with marker details
        const infoWindow = new google.maps.InfoWindow({
            
            content: `Location: ${address+marker.date}`
        });
        // Open info window
        infoWindow.open(map, marker);`your text`
    });

}, 1000);
}

here is the code that i am trying for getting date for particular address.

following is the script that iam using

<script src=”https://maps.googleapis.com/maps/api/js?key=Your-key&callback=initMap&libraries=places&v=weekly” defer></script>

`

How to Add a diffrent FONT in this script? [duplicate]

Hello all i have this script running how do i add a font in this? I Not that good at this but i,m learning . I tryed some thinks so i need some help at this.

<!DOCTYPE html>
<html>
<style>

body {
  background-image: url('****/*****/Weerbericht_Achterhoek.jpg');
  background-repeat: no-repeat;  
  background-attachment: fixed;
  background-size:  100% 100%;
</style>
<body>


<iframe id="myFrame" frameborder="0" scrolling="no" style="height:800px;width:8000px;border:none;" src='https://****/****/loadknmi.php'></iframe>
<script>
var frame = document.getElementById('myFrame');
frame.onload = function () {
var body = frame.contentWindow.document.querySelector('body');
body.style.color = 'white';
body.style.fontSize = '23px';
body.style.lineHeight = '20px';



};
</script>



</body>
</html>

How to view kml files in custom google maps the same as it appears in google earth

I have a simple kml file that have MultiGeometry tag with both LineString and Point within:

here is how the kml file looks :

<?xml version='1.0' encoding='UTF-8'?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
    <name>lines.kmz</name>
    <Style id="LineStyle00">
        <LabelStyle>
            <color>ff0000ff</color>
            <scale>2.0</scale>
        </LabelStyle>
        <LineStyle>
            <color>ff00ff55</color>
            <width>3</width>
        </LineStyle>
        <PolyStyle>
            <color>00000000</color>
            <outline>0</outline>
        </PolyStyle>
    </Style>
    <Folder id="FeatureLayer0">
        <name>مسارات المصارف الجديدة</name>
        <Snippet maxLines="0"/>
        <Placemark id="ID_00000">
            <name>العياط</name>
            <Snippet maxLines="0"/>
            <description>&lt;html xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:msxsl="urn:schemas-microsoft-com:xslt"&gt;

&lt;head&gt;

&lt;META http-equiv="Content-Type" content="text/html"&gt;

&lt;meta http-equiv="content-type" content="text/html; charset=UTF-8"&gt;

&lt;/head&gt;

&lt;body style="margin:0px 0px 0px 0px;overflow:auto;background:#FFFFFF;"&gt;

&lt;table style="font-family:Arial,Verdana,Times;font-size:12px;text-align:left;width:100%;border-collapse:collapse;padding:3px 3px 3px 3px"&gt;

&lt;tr style="text-align:center;font-weight:bold;background:#9CBCE2"&gt;

&lt;td&gt;العياط&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td&gt;

&lt;table style="font-family:Arial,Verdana,Times;font-size:12px;text-align:left;width:100%;border-spacing:0px; padding:3px 3px 3px 3px"&gt;

&lt;tr&gt;

&lt;td&gt;SHAPE&lt;/td&gt;

&lt;td&gt;Polyline&lt;/td&gt;

&lt;/tr&gt;

&lt;tr bgcolor="#D4E4F3"&gt;

&lt;td&gt;الاسم&lt;/td&gt;

&lt;td&gt;العياط&lt;/td&gt;

&lt;/tr&gt;

&lt;tr&gt;

&lt;td&gt;SHAPE_Length&lt;/td&gt;

&lt;td&gt;3299.179106&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;/td&gt;

&lt;/tr&gt;

&lt;/table&gt;

&lt;/body&gt;

&lt;/html&gt;</description>
            <styleUrl>#LineStyle00</styleUrl>
            <MultiGeometry>
                <LineString>
                    <coordinates>
                        31.22167327537224,29.60699409142521,0 31.21864638138206,29.60718181167419,0 31.21700996113995,29.60744215099063,0 31.21414622689401,29.60878103953701,0 31.21295610437081,29.60959924916077,0 31.20477400640138,29.60788844697299,0 31.20298882177771,29.61257455770906,0 31.19333333292129,29.60888888869802,0 
                    </coordinates>
                </LineString>
            <Point><coordinates>31.21295610437081,29.60959924916077,0</coordinates></Point></MultiGeometry>
        </Placemark>

    </Folder>
</Document>
</kml>

when I open this file on google earth it works like charm with both elements shown perfectly, but when I open it on my Google Maps using js script as follows:

            var kml_layer = new google.maps.KmlLayer(src, {
                suppressInfoWindows: true,
                preserveViewport: true,
                map: map
            });

it only shows LineString without the point shown on it .. any idea what could be causing this?

Trying to nest Text components with different font properties inside another Text component. In one case, the line height cuts some of the text

I have a React Native application and I am trying to create a sentence where the different words have different styles, so I created a Text component and tried nesting other Text components with different styles inside of it. For example this works fine:

        <Text>
            <HeaderText2>Hello</HeaderText2>
            <HeaderText6>From</HeaderText6>
            <HeaderText2>The Other Side</HeaderText2>
        </Text>

And the result is:

enter image description here

However, if I swap the components so that the component with smaller line-height and font-size is first, it breaks somehow and nothing gets rendered.

        <Text>
            <HeaderText6>Hello</HeaderText6>
            <HeaderText2>From</HeaderText2>
            <HeaderText6>The Other Side</HeaderText6>
        </Text>

And this is how my HeaderText2 and HeaderText6 styled components look like:

const HeaderText2 = styled.Text`
    font-size: 30px;
    line-height: 39px;
`;

const HeaderText6 = styled.Text`
    font-size: 12px;
    line-height: 16px;
`;

Anyone have any clue why this might be happening? It’s important to remember that this is React Native, so there might be some React Native shenanigans happening. When I delete the line-height of both components, it works fine but I want the line-height of the component with bigger line-height to take precedence and not be without line-height.

Distinct value in object of array and remaining values into another array

This is the array of javascript objects. I want these javascript objects will merge into a single javascript object according to their same property value and remaining values come into another array of named info.

This is the original array:

const array = [
    {
        price: 27,
        colors: "BLACK",
        size: "S"
    },
    {
        price: 23,
        colors: "GREEN",
        size: "S"
    },
    {
        price: 0,
        colors: "GREEN",
        size: "M"
    },
    {
        price: 0,
        colors: "OLIVE",
        size: "S"
    },
    {
        price: 65,
        colors: "RED",
        size: "S"
    },
    {
        price: 12,
        colors: "RED",
        size: "M"
    },
    {
        price: 12,
        colors: "BLACK",
        size: "L"
    },
    {
        price: 34,
        colors: "RED",
        size: "L"
    },
    {
        price: 43,
        colors: "OLIVE",
        size: "M"
    },
    {
        price: 23,
        colors: "OLIVE",
        size: "L"
    },
    {
        price: 34,
        colors: "GREEN",
        size: "L"
    },

]

This is the required array:

 [
    {
        colors: "BLACK",
        info: [{size: "S", price: 27}, {size: "L", price: 12}]
    },
    {
        colors: "GREEN",
        info: [{size: "S", price: 23}, {size: "M", price: 0}, {size: "L", price: 23}]
    },
    {
        colors: "RED",
        info: [{size: "S", price: 65}, {size: "M", price: 12}, {size: "L", price: 34}]
    },
    {
        colors: "OLIVE",
        info: [{size: "S", price: 0}, {size: "M", price: 43}, {size: "L", price: 23}]
    },
]

Kindly provide me with some solutions. Thanks

Ionic Capacitor (Angular): how to prevent closing of keyboard after “submit” with enter key

In Ionic Capacitor (I am using Angular): How do I keep displaying the keyboard open, prevent it from closing, when the user submits the form or input?

I know there are questions like this one on StackOverflow, but they refer to Ionic Cordova and not Ionic Capacitor.

I want this to work on native IOS/Android, I don’t care about PWA. (and dont care about Desktop-Web of course, since it doesnt even have a keyboard on the screen).

Blazor Java script interop

I have this javascript library that is written in TypeScript

(function(f) {
    if (typeof exports === "object" && typeof module !== "undefined") {
        module.exports = f()
    } else if (typeof define === "function" && define.amd) {
        define([], f)
    } else {
        var g;
        if (typeof window !== "undefined") {
            g = window
        } else if (typeof global !== "undefined") {
            g = global
        } else if (typeof self !== "undefined") {
            g = self
        } else {
            g = this
        }
        g.richTextEditor = f()
    }
}
)(function() {
    var define, module, exports;
    return (function() {
        function r(e, n, t) {
            function o(i, f) {
                if (!n[i]) {
                    if (!e[i]) {
                        var c = "function" == typeof require && require;
                        if (!f && c)
                            return c(i, !0);
                        if (u)
                            return u(i, !0);
                        var a = new Error("Cannot find module '" + i + "'");
                        throw a.code = "MODULE_NOT_FOUND",
                        a
                    }
                    var p = n[i] = {
                        exports: {}
                    };
                    e[i][0].call(p.exports, function(r) {
                        var n = e[i][1][r];
                        return o(n || r)
                    }, p, p.exports, r, e, n, t)
                }
                return n[i].exports
            }
            for (var u = "function" == typeof require && require, i = 0; i < t.length; i++)
                o(t[i]);
            return o
        }
        return r
    }
    )()({
        1: [function(require, module, exports) {
            "use strict";
            Object.defineProperty(exports, "__esModule", {
                value: true
            });
            exports.showHello = void 0;
            const greet_1 = require("./greet");
            function showHello(divName, name) {
                const elt = document.getElementById(divName);
                elt.innerText = (0,
                greet_1.sayHello)(name);
            }
            exports.showHello = showHello;

        }
        , {
            "./greet": 2
        }],
        2: [function(require, module, exports) {
            "use strict";
            Object.defineProperty(exports, "__esModule", {
                value: true
            });
            exports.sayHello = void 0;
            function sayHello(compiler) {
                return `Hello from ${compiler}`;
            }
            exports.sayHello = sayHello;

        }
        , {}]
    }, {}, [1])(1)
});

and I am trying to execute showHello function in this library using JSInterop in Blazor using following code

public class TypeScriptInterop
{
    private readonly Lazy<Task<IJSObjectReference>> _moduleTask;

    public TypeScriptInterop(IJSRuntime jsRuntime)
    {
        _moduleTask = new(()=>
        jsRuntime.InvokeAsync<IJSObjectReference>("import", "./_content/Blazored.RichTextEditor/js/bundle.generated.js").AsTask());
    }

    public async ValueTask TsButtonClicked()
    {
        var javaScript = await _moduleTask.Value;
        if (_moduleTask.IsValueCreated)
        {
            Console.WriteLine("Captured Js");
        }
        await javaScript.InvokeVoidAsync("richTextEditor.showHello", "greeting", "Ubhaya");
    }
}

when I run this I get the error message saying

WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Could not find ‘richTextEditor.showHello’ (‘richTextEditor’ was undefined).

but if I use <script src="./_content/Blazored.RichTextEditor/js/bundle.generated.js"></script> inside the index.html in blazor wasm project. it works correctly.

I am trying to create a Blazor component library. is there a way to do this in my current approach since I want to use JS isolation.

How to preserve GPT-3/4 base knowledge when adding indexed data?

I’m conducting experiments with LangchainJS, Pinecone, and OpenAI.

My goal is to use the model (for now GPT-3, as I still don’t have GPT-4 API access) to assist me in my coding job by adding new data on specific frameworks.

I have already indexed the craft.js documentation and codebase, and by using both ConversationalRetrievalQAChain or Agent by creating a tool for this specific index, the model is quite capable of answering my questions.

The issue I’m facing is that I feel it loses its base capacities. For example, it is never able to generate code based on that information, or worse, if I ask it to generate code on another framework (e.g., Next.js), it either tells me it doesn’t know or gives me a nonsensical response like “Even though we can create Next.js components using Craft.js, it is not the best tool to achieve this task.”

But if I try this prompt:

Generate a Next.js component that allows file uploads.

in the playground or with model.call(prompt), it generate a nearly perfect code.

It seems that when I add embeddings to the model, it becomes overly focused on this new data and loses some of its power.

Is there a way to maintain the power of the base model and add new knowledge to it? If so, what is the best approach to achieve this?

Want to open a quick create form after creating a new account in Microsoft Dynamics 365 Sales

I want to open a Quick Create Task form with the regarding field prepopulated with the newly created account’s name. When a new account is being created in dynamics 365 sales it open a quick create for for the task but it is not being prepopulated with the account name that i just created. the account name should be prepopulated in the regarding field which is a lookup field to the accounts on the task form.

function taskFormAccount() {
    var formType = Xrm.Page.ui.getFormType();
    if (formType === 1) {
        Xrm.Navigation.openForm({
            entityName: "task",
            useQuickCreateForm: true
        });
    }
}

Update this code so that when account is created it should open quick create form of task prepopultaed with account lookup in the regarding field in Task form in dynamcs 365 sales

how to remove child data from array javascript

How to remove selected item and nested item too from array using javascript

function filterID(id, data) {
  return data.reduce((arr, item) => {
    if (item.id != id) {
      if (item.children) item.children = filterID(id, item.children)
      arr.push(item)
    }
    return arr   
  }, [])
}

https://jsfiddle.net/p5fxhcbk/1/

Please help on this

Thank You

it should also removed JZLS37EVZQM22H9Q4659 item as well since it is child element of JZLS37EVZQM22H9Q4655

Why redux store deletes when click on tag?

I want to replace the tag element with something else if possible in such a way to be able to keep the redux store. I tried Link or NavLink but it is not working. I want to keep the redux store without a persistent feature.
My app works fine on all screens without a persistent store but when I click on a tag the store is deleted and I have to login back.

How to show YouTube settings menu with custom button?

I want to show YouTube settings menu with custom button, how can i do that?

chrome.runtime.onMessage.addListener((obj, sender, response) => {
const { type, value, videoId } = obj;

if (type === 'UPPER') {
  const upper = document.querySelector('.ytp-settings-menu');
  upper.style.removeProperty('display');
}

});

Can’t scroll to field when call field.focus() in ios browsers in web application

I create a form validation for my app. Now I test it for mobile devices. There is form with several fields and a “Submit” button below. When I click the button and the required field is empty, field.focus() method invoked. Focus causes scrolling to the field by design. It works fine on android devices on any browser, but there’s no scroll to field on ios browsers (safari and chrome as well), only when I already focused on this field. When field was not focused originally, it works fine.

There’s a picture to better understand the problementer image description here

  1. Tap on ‘name’ field

  2. Keyboard opens so field goes beyond view

  3. Tap on ‘submit’ and app call field.focus()

  4. I expect view scroll to ‘name’ field (that’s how .focus() should work and it work on android or desktop, but not in ios) but it doesn’t happen

I tried to call field.scrollIntoView(), but it cancells field.focus(). I cant find a way to make them works together

What should I do?

Thank you in advance!