Google map api overlay takes controls - google-maps-api-3

I'm displaying an image over the entire google map. The image is transparent. I follower the documentation from google and everything worked out fine. The image will change each time i move or zoom on the map. After a while I can't zoom or move the map anymore, I'm zooming and moving only the image. Why does this happen and how can I solve it?

There are multiple issues contributing to problems on the page:
You are destroying and recreating your overlay on center_changed and zoom_changed events. Instead, you should just be updating the image within the overlay. You should really only need to create the overlay once.
Instead of adding your weather image to your OverlayView, you are adding it to a div that covers the map. This is what is blocking your events from effecting the map (the click and drag events are occurring on your weather div not the map).

Related

How to target a cell and follow it using css, like google maps recenter

I'm attempting to track a specific cell, such as the one now selected, as seen in this video, which has a background color of red that moves.
https://drive.google.com/file/d/1pbaUMSE6RmPUTHDiflpMVQEg7HBmZ3ce/view?usp=drivesdk
My goal is to show something similar to this, where it zooms in on the presently selected cell and shrinks the window, similar to the Google Maps recenter button.
I'm using React BTW.

xamarin forms map sometimes very slow to update tiles, unless I rotate device

I am using xamarin forms map for a tracking application, so the view tends to move across the landscape and tiles need to be loaded to show the new area. I am scrolling using map.MoveToRegion
Sometimes the map tiles are loading extremely slowly, to the point where the entire region is just white with no graphics. Initially I thought it was a data speed issue, but it turns out that if I rotate the device, changing the layout landscape/portrait, this makes the map instantly refresh, so the data was apparently available, it was just not being rendered. Zooming can have the same effect, albeit not quite as effectively.
How can I force a refresh, or alternatively just make the map refresh more quickly?
Turns out the issue is that the way to move the forms.map is by MoveToRegion, and that animates the motion. If the animation takes one second and new positions are being set at a higher, or equal, frequency, the map is effectively always in the middle of an animation.
When the map is animating, it is not willing to refresh the tiles, and so the map eventually becomes blank.
When I rotated the device, this constant animation was interrupted, and it could refresh the tile graphics.
The solution was to make a custom renderer with an alternative - non animated - method to move map focus.
private void moveToFast(Location location)
{
var update = CameraUpdateFactory.NewLatLng(new
Android.Gms.Maps.Model.LatLng(location.Latitude, location.Longitude));
googleMap.MoveCamera(update);
}
There are plenty of examples of custom map renderes, so I will not post that here. The main takeaway is really just that...
while the map is animating, it will not refresh its tiles, so if you constantly update the map location, you should do so in a non-animated way.

KineticJS canvas on top of Google Map. Shapes fall apart on drag and zoom

I'm trying to display property boundaries on top of a Google Map by using KineticJS and a Google Maps OverviewLayer.
It works great (1000 parcels being shown at a time. Much faster than Google.Maps.Polygon())
When I drag the Google Map down, then zoom in/out, the top shapes get cut off and don't re-draw when I zoom back out.
I'm guessing its a setX, setY thing but I don't understand the underlying concepts enough.
Any help would be appreciated.
Here is my app:
KineticJS and Google Maps OverlayView test site
I added a light-green background to the KineticJS canvas to see what it happening when you zoom in.
The canvas seems to stay locked in place and the same width/height but when you zoom in I'm guessing the canvas should grow proportionally.
I can't figure out how to do that though....
Any help would be appreciated!

Poly map with simple hovers

Can anybody tell my how map on http://ubytujnaslovensku.sk/sk/ was created/how to create something simillar?
there's only one image....
The map on the website you have provided is using two images. The first image is the actual IDLE map, the second is a shadow version of it.
The shadow version is simply a 'Sprite', where all of the areas is inset and is looking however they want it to look, when you hover it.
Whenever you then hover a zone JavaScript sees it and sets the 'Background-position' variable according to the country you are hovering.
The Sprite image is shown here.
I would suggest you to get a deeper understanding of sprites before trying to accomplish a similar map.

Handling overlays on Google Streetview custom panoramas

i'm trying to use overlays on a custom google StreetView Panorama.
I was able to simply put one on my pano, but the position is totally random (i made some attempts until the effect was alright), and the change of rendering mode (in chrome which renders as a sphere) changes the effect.
The problem is clear: the custom panorama has no information about its dimensions (it has only a LatLng), so the relative positions are wrong.
Am i missing something?
The only thing i need is to put some clickable labels on the walls of a room, which modify themselves along with the rotating panorama. I searched a lot, but my efforts were inconclusive.
Mapsicle seemed to do what i needed, but if i understood correcly it's a dead project.

Resources