How to show Google Map in a different shape - google-maps

I'm trying to find (without luck so far) any examples of Google Maps that are shown in a shape that is not the standard rectangle.
I know that ultimately the map IS a rectangle, but specifically I'd like examples of how I could show graphics on top of that rectangle to give the illusion that the map borders are a different shape.
To explain further what I mean, imagine a page with a black background with a standard Google Map (rectangle) in the top left. Now imagine placing a DIV over the bottom half of the map, where this DIV contains half a black circle and a transparent background. The purpose would be to give the illusion that the map has a curved bottom edge.
I'd then want to do something similar with the remaining 3 sides so that the map no longer appears like it's in a rectangle.
To explain further still, I'm going to be given a web page template which will have a shape - not a rectangle - into which I'm expected to put a Google Map...
Importantly, I'd still need to be able to 'grab' the map with the mouse and move it about within its 'new shape'.
Any advice would be appreciated - thanks.

Related

Google Slides Select Shape And Zoom to it

I am trying to use the functionality of Google Slides to create a complicated diagram of a complicated process. Basically, I have tiny rectangles (shapes) within larger rectangles within even larger rectangles, all on top of a huge rectangle that occupies my entire viewport with the maximum zoom out (Ctrl-Alt-Minus pressed many times). Rectangles have some small font text in them and there are also a bunch of connectors going from one rectangle to another.
It's a big mess.
When I want to see the details of a small rectangle, I use the provided Ctrl-Alt-Plus shortcut to zoom in as far as it lets me. However, it's incredibly cumbersome, because it will only zoom in to whatever is in the very center of the screen. So, I need to constantly adjust my view port to place what I want into the center of the screen.
What I want is to write a script (if such functionality is in fact provided - hence the question) where I could click on a specific rectangle and it would immediately zoom to this rectangle, placing it in the middle of my screen, it occupying about 50% of the screen space.
I looked through Google Slides API reference and found absolutely nothing related to zoom. Am I searching incorrectly, or is it simply not there?

LibGDX TextureRegion draw bug when using split method and scaling

I get a graphical glitch whenever I try to split my tileset into a TextureRegion[][] and drawing them. It works fine when I am using the default aspect ratio but when the window has to stretch, it seems to be accessing a line of pixels from the next tile in the tileset and drawing them. Here is a picture (The lines I am referring to are the 2 vertical brown lines in the water. They seem to be from another tile in my tileset):
The lines also move when I move the player. And when I run the game on my tablet, a similar effect happens except its the bottom layer of my player's feet that appear above its head.
I saw a similar problem in stackoverflow (stackoverflow.com/questions/285...) but the solution did not work for me. It said I should put a padding but that just makes the lines transparent and you see the background color.
Here is the solution I found. Someone on stackoverflow asked a similar question and they got a working response. They made a tile bleeding fix method. Here is the post: White vertical lines and jittery horizontal lines in tile map movement
Credit to grimrader22. Thanks a lot!
Thanks everyone else who helped get me on the right track to getting the solution.
As you said, the usual solution is to add a padding.
The padding should be of the same color as the border of the tile. For example the water tiles should have a blue padding and the sand a yellow one.
That way you won't get the transparency and it will be seamless.
Hope it helps.

Selection only on visible part of a shape?

I would like to have the JGraphX editor to be able to select a shape only if the user click on a visible part of the shape instead of the full bounding box of a shape. For instance, if you insert a Triangle in a graph, I want to be able to select it only by clicking inside the triangle.
This would also be usefull after a rotation because the "bounding box" can be totally different than the visible shape once rotated.
Both things are working really well in draw.io, so I just would like to know where to look at in the Javascript to be able to do it in the Java Swing version.
Thank you.

circular overlay projection distortion

I’m currently using the ‘GroundOverlay’ function within a KML file to display an circular image. I know the circle is 48 degrees in diameter, and I want it to look like a circle when I overlay it on the earth. Rather than being a perfect circle though, it’s distorted, most visibly at the poles. I think the reason for the distortion is that GoogleEarth assumes my original image used a map projection, so GE “unprojects” my image, creating the distortion. Is there a way to overlay my circular image as a circle through KML or the maps API by turning off the projection? Or is my only option to project my circular image into a simple cylindrical projection before I call GroundOverlay on it? I'd really prefer the first option if it exists.

Custom shape and fill in HTML5 canvas

I have a small project I am working on HTML5 canvas and I wanted to get some ideas how to accomplish it. I have built an outline of a tree using all the canvas line functions. lineTo, bezierCurveTo, quadracticCurve, etc. I have attached a picture of the outline. Now, what I would like to do is have some code that fills a percent of this outline. Kind of like a progress bar starting from the bottom. Does anyone have ideas on how to accomplish this?
Thanks
Rather than thinking of the problem as having to fill a percentage of the inside of the tree, why not split the image into two layers, the tree and the "fill", and then draw one over the other. See my image below for a quick and dirty example.
Of course, you will need to obscure the rest of the "fill" layer, so you will need to fill the outside of the tree shape white, but this should be fairly easy as you already have the path worked out. In essence, your path would instead of being the outside edge of a a tree shape, become the inside edge of a tree shaped hole!