Is it possible to have interactive elements (e.g. polygon responding to drag and click events) in Google Earth (I specifically need Google Earth, not Google Earth Plugin!)
The documentation doesn't seem to be helpful as most of the activity has moved towards the plugin, but the project in question is using Google Earth. I know I have full access to JavaScript and WebKit inside the balloons, but can I use JavaScript to access KML elements and assign event listeners to them?
UPDATE:
Let's say I want to use Google Earth to control a web cam. The KML would show the region of the field of view of the camera. I would like to be able to drag that region, have JavaScript handle that dragging and invoke a web service which would rotate the webcam accordingly.
Directly responding to polygon click and drag events in Google Earth (outside of using the GE API and Plugin) doesn't offer you much options. Using GE API it's easy but in the Google Earth client you cannot directly respond to moving or dragging a placemark. Also, once a placemark is sent to the client, its location if moved cannot be accessed via client-side JavaScript and sent back to the server.
There are a number interactive techniques to use in KML and Google Earth, some of which might work with what you're trying to do.
You can provide controls or configuration options in HTML forms in the description balloons to customize the display or change location of web camera :
For camera control you could show up, down, left, right buttons (maybe even zoom or tilt) in the balloon description and clicking any of those buttons which calls your backend controller to move the camera. The output of the action could use NetworkLinkControl to update the KML already loaded in Google Earth.
You can consider NetworkLinks which specify a viewFormat via a backend KML generation service. You can specify a NetworkLink to refresh and report back to the backend service with the view/camera information and/or other client-side parameters if the view changes. You could respond to view changes (zoom in/out, pan, tilt, etc.) and change state accordingly. If you further constrain NetworkLink updates with onStop then you can prevent incremental updates when user is in process of moving and only send refresh updates after user has stopped moving, which presumably user is looking at something.
The viewFormat would give you access to the following client properties of Google Earth:
[lookatLon], [lookatLat], [lookatRange], [lookatTilt], [lookatHeading]
[lookatTerrainLon], [lookatTerrainLat], [lookatTerrainAlt]
[cameraLon], [cameraLat], [cameraAlt]
[horizFov], [vertFov]
[horizPixels], [vertPixels]
[terrainEnabled]
Related
i am building a notification system where i have little icons under primary image (like on facebook, where icon indicates if notification is about post react, comment or anything else), now i am planning to send string like "purchase" | "greeting" and etc. and convert them to icons on frontend. but problem here is that i have to keep separate data on both side, one on server which lists possible icon types and one on frontend which keeps track of which icon type is compatible to which icon, and they have to be in sync, which is a problem for me because i want it to be automated, while i could send icon (react-icons) to frontend from backend i think that would affect bandwidth terribly, so what is the best practice for doing this?
When attempting to the load the default SSO SignIn page in Azure, the Email Address element is selected by default and in focus as follows;
When the page is zoomed the Email Address input is rendered at the top of the page on load, this causes tablets and smaller devices to be presented with a page that is already scrolled.
I have attempted to add a new input on a custom page and given it a tabindex of 0 (as a hack) as the default for all element contained inside the "api" div is 1.
I have also given the input element the autofocus attribute but it seems to strip both on render.
https://www.realmadrid.com/en/login is using a similar SignIn page and appear to have this function turned off, having gone through all the source that I could find it isn't directly apparent how they are achieving this.
Obviously this would be easy if it were possible to use JavaScript on custom pages in Azure B2C SSO but as this is not yet possible, does anyone know of a possible workaround or fix for this issue?
Update:
It's a little hard to illustrate using a screenshot, but if you select 'run now' on a new default 'SIGN-UP OR SIGN-IN POLICY' policy, set responsive as per screenshot, scroll to the top of the page and press F5, you'll be able to see the stated behavior.
We are using heavily custom policies, I'm aware of how to do this, I'm using a default example for ease of replication.
This is no longer an issue due to MS allowing front end JS https://learn.microsoft.com/en-us/azure/active-directory-b2c/javascript-samples
Can Chromecast be used to display a web site or web app? All the sample sender/receivers I've seen so far show how to play videos. The docs posted so far are minimal as best, just an API reference with little explanation what any of it does. I just want to send a URL of my choosing and have that page displayed on the TV. There's no user interaction required past that point. Assuming that's possible, does anyone have sample Chrome sender and receiver code for that?
I was able to modify the Github sample Project > googlecast/CastHelloText-chrome
to show a web page.
In the receiver.html file, I replaced the DIV with an IFRAME and styled it for 100% width and height.
Then in the displayText() function I changed innerHTML to src.
The only modification made to the sender chromehellotext.html was to replace YOUR_APPLICATION_ID with the app id created by registering the receiver.
Note that some sites like Google and Yahoo will not display inside an iframe. If you really needed to do that you could skip the iframe and just set window.location.href to the URL. That, of course, will overwrite your receiver code so the only way to change URLs would be to manually disconnect first and reload. I tried using window.open instead but that did not work.
One could imagine writing a Custom Receiver that has an iframe that wraps any website. Your sender would could then send webpages to your receiver, and the onLoad would set the the URL of the iframe. Don't have any code, but it's fairly simple to write.
There is a simple way to do that with the hellotext sample. You can send the html by typing that into the text field.
<iframe src="http://mywebpage.com" style="width:1280px;height:720px"></iframe>
To provide extra info from the current answer, as this post comes up near top on most searches.
Thing to search for is Digital Signage, this is the sort of industry word.
following GreenScreen Chromecast works okay. Greenscreen
host solution is Sign Simple - which looks to be same approach as Greenscreen without you needing to host the receiver web page.
Similar hosted solutions using Raspberry Pi can be found.
Of note: with GreenScreen and the CastHelloText, I could not get 1080p only 720p, some comments mention Video only in 1080p, but Images in 720p, which I take to mean html pages aswell.
Chromecast can indeed be used to display an arbitrary URL.
This can be done from plain old Chrome, using 'url-cast-receiver'. (Usable 'demo' page, GitHub project page.)
Docusign iframe is wider then my wrapper(html body). Is there a way to change the width of the content in the iframe? I can change the width of the iframe to match the page, but then I end up having a horizontal scroll bar.
Also, users need to sign a document that's like quarter of a page. But Docusign shows the whole page, and when I try to change the height, I get a horizontal scroll bar. There's also a lot of white space after the document. How can I get rid of the white space after the document? Is there a way to create a document in Docusign that's only half a page, or even less?
Here's what it looks like:
http://community.docusign.com/t5/image/serverpage/image-id/845iEC30DDC72CFD7F83/image-size/original?v=mpbl-1&px=-1
Thank you.
I don't believe it's possible to configure/change the amount of screen real estate the DocuSign signing session window consumes. Whenever you're using the DocuSign API to facilitate embedded/captive signing within your site (as you are), best practice would be to launch the DocuSign URL in a new browser window/tab -- for a few reasons:
Some types of browsers have issues when external apps embedded in an iFrame try to write cookies (as DocuSign does).
Rendering DocuSign in an iFrame on a mobile device can result in a poor user experience, since DocuSign requires quite a bit of real estate and screen sizes on mobile devices are small to start with.
Rending DocuSign in its own window allows you to avoid the scrolling issues you're encountering.
Instead of trying to change the css of the iframe, why not just use Docusign's API?
Learn more about it here.
Is it possible to create a checkin by allowing a user to click on button in a html page that takes them to a share location (checkin page)?
I am thinking- something like the twitter share url?
for example-
http://foursquare.com/share/?venue_id=12345
I want this functionality in order to allow users to swipe their nfc phone on a smart tag and it loads a html page with different options
On an Android-based or iOS-based mobile device, you can use special formed URLs in order to start the Foursquare application viewing the desired venue: https://developer.foursquare.com/resources/client
The URL https://m.foursquare.com/venue/#venue_id# (e.g. https://m.foursquare.com/venue/4b477346f964a520723226e3) can either be opened by the installed Android Foursquare App or opened by a normal browser (or other Intent receivers registered for that URL).
You can further use the URL https://foursquare.com/mobile/checkin?vid=#venue_id# to get to the mobile page, where you can just press "check in" or enter a shout. By checking-in via the mobile page (and not the app), you do not get points and are not able to earn Mayorships (see Foursquare support).
But you can, for example, create your own web app that accesses the Foursquare API and performs the check-in for the OAuth'ed users. By using the HTML5 Geolocation feature, you can also send the mobile device's Lat/Lon coordinates to your web app and perform valid check-ins that also count for Mayorships, etc. A good start is Foursquare's developer page: https://developer.foursquare.com/overview/