OpenLayers does not request tiles at low zoom level after updating the view with a new projection - python-requests

At zoom level close to 0, if I update the view with a new projection, OpenLayers doesn't request all the tiles, only some of them. I have to pan or zoom in and out to make it request all the tiles.
I can understand that this s useless if I only update the zoom level or the center, updating the projection should cause all tiles to be requested from the server.
Is this a bug or is any there a way (or workaround) through configuration or code to make OpenLayers request all tiles after changing the projection?
Note that I disabled the browser cache.

Related

Drupal 7,x baidu map loaded but not displaying

I am trying baidu map module on Drupal 7.x . It is not displaying the map from some reason.
The map is there. Once I switch the view(satellite view, normal view), the map starts to show up.
Open the firebug and I find that Baidu is returning a piece of JavaScript code containing "document.write" which does the the painting of the map as it seems.
But this is the farthest I can go, I don't know how to touble shoot this.
Any help would be appreciated.
http://d7.jusfeel.cn/node/1
This may be due to the zoom level when the map is loaded. Please reduce one zoom level and check it again its working for zoom level of 15. but your default zoom level is 16.
It may also be the case that you have not set the default zoom level. Check after setting the default zoom level.

How to set default (angle) to map, default value to rotateControl?

At a wordpress directory site, dubainurseries.com, I have the google map and my markers on it.
I want to load map 30-40 degree rotated into the page by default while it is on street view. Is there a way to do it? This is really necessary to use the screen more efficient to show more markers in a higher zoom.

Google Maps API zoom without tiling

I'm using the Google Maps API to browse my own maps. The problem is, I only have one rather small resolution file, that I wanna display fully at level 0, which means it's not gonna get any more accurate when zooming. I still wanna be able to zoom though, by just enlarging the image. This would be useful for the markers and polygons I intend to draw on it, as they could be viewed in larger detail.
I could just create dummy tiles, that show no higher resolution than the original, but that seems like a roundabout solution that would do nothing but create more unnecessary server requests for the map files, as well as more traffic.
The problem seems to be the getTileUrl() function, as it is required. I can't think of a clever way to abuse it either, to only show different sections of the same map.
I know it already supports image enlarging, as you can observe the effect when you zoom in. The question is, if you could make that effect permanent somehow, and not make the image disappear if no new image is provided.
Suggestion:
Use the ImageMapType only to hide tiles at all(therefore let getTileUrl() simply return null)
For your own map don't use tiles, create a GroundOverlay instead.

Vectors moving and zooming while multitouch event with OpenLayers and Google Layer

I'm using OpenLayers with Google Layer, and I have a strange behaviour about vectors on the map.
On mobile (Android), when doing a multitouch event on the map (zoom), vectors move and zoom as the touchmove event is active. But when the touchend event is trigger, vectors are refresh at the right place and with their real size.
This is not happening with OpenstreetMap layer. I also tested some web pages implementing OpenLayers & Google Layer & a vector layer on my mobile, and they all have the same issue. Any idea why ?
I tested this one, if someone want to reproduce : http://www.macfh.co.uk/Test/Google_with_OpenLayers.html With a multitouch event, marker is moving/zooming, and then go back to its initial place.
I already took care about the sphericalMercator specifity, so I think it's not the problem.
Thanks in advance !
Tiles positionning for google layers is done through their api, which doesn't allow to make pinch zoom work the same way it’s done for all others layers: Pinch zooming doesn't work with google layers.
If you want pinch zoom to work, you should consider using layers with direct access to tiles (OSM, Bing, …). And your mobile will thank you for the decrease of number of scripts to load ;).

Specific way of selecting a location on a google map

I've inherited a small project. The person before me created a native app for iPhone, implemented in objective-c, and my job is to remake it as a webapp with PhoneGap for iOS and Android.
In my predecessor's original implementation, part of the app has the functionality of allowing the user to drop a marker on a map to select a location. I found a comparable way of doing this, but the supervisor wants the exact way she'd done it, which I'm having a little trouble with. Let me describe:
In her native app, the map appears with a marker in the center of it. The user then slides the map around beneath the marker (which stays in place on the screen), until the marker is positioned over the spot they want. Then they hit a button marked "Select," and those coordinates are sent to the app for irrelevant other operations.
I'm trying to do the exact same thing with the google-maps javascript api and html/css, and I can't figure it out. Do any of you Gmaps pros have any ideas?
You may observe the center_changed-Event of the map. When it fires set the position of the marker to the new center of the map.
Another suggestion:
For a better effect instead of a marker you may use a custom control. You may insert a marker-image there so it will look like a marker. To place it in the center, push the control to
map.controls[google.maps.ControlPosition.RIGHT_CENTER]
(it will be vertically centered then) and apply the horizontal centering by adding a right-margin to the control

Resources