Drupal 7,x baidu map loaded but not displaying - drupal

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.

Related

get zoom level and center point from browser console for mapbox

I'm using Rmarkdown to make a report with mapdeck which uses javascript libraries (deckgl,mapboxgl, etc) to create maps.
Once I generate the map object I can scroll and zoom around and inspect the window. What'd I'd like to do is after I scroll and zoom, extract the current zoom and center location from the browser console/inspect window so I can hard code that as a starting point. As it is, I'm constantly guessing and checking (lots of rerendering the map) a starting location and zoom level to fine tune the starting point which seems unnecessary.
I found in the console mapboxgl.getZoom but that comes back as undefined. Is it possible to get that info from the console?
Use show_view_state = TRUE to get a live overlay of the view's "state"
mapdeck(show_view_state = TRUE)

HERE Map not rendering

I'm not sure what's wrong, but after setting up the map, all I get is a light blue screen. Changing schemes seems to not affect it either. Neither does changing the geoCenter (currently testing with: 37.73088189776775 -122.14045649405767) which is in the SF bay area.
Also, when I check usage on the project via my account, it is 0 despite me testing all day.
My delegate is called when I try to scroll the map, so I know that part is hooked up and I'm actually rendering the map. It's just a light blue screen...like I'm stuck in the ocean...
Any ideas? Any low hanging fruit I can check? Thanks.
Update: I'm using the iOS Starter SDK. Please let me know what additional information would help. Thanks.
I was able to get it working by not embedding the map inside another view. By bringing it to the top level, and then subclassing it I was able to get it to work. Thanks.

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

Masking the Google Map in iOS

In my app I have displayed some custom overlay on google map using MKOverlay with the help of TileMap sample code. My requirement is, I need to mask the entire google map underneath the overlay.That is, I want rest of the map area to appear to be in gray except my custom overlay.
Could anyone give me direction on how to achieve this?
Thanks in advance,
I don't know all the calls that you'd need to cover but I know how to find out. In the TileMap example code provided by Apple they show how the MKMapView will call for tiles. All you'd need to do is swap out the code that finds files on disk and swap in some code that always returns a grey square every time.
However this won't remove the Google logo or stop the app from downloading the map tiles from Google in the background. If you find out how to stop that please let me know.

Resources