google maps api versions issue - javascript

I have a problem regarding use of Google maps api.
When I use api source as
https://maps.googleapis.com/maps/api/js?v=3.9&sensor=true&libraries=places&callback=LoadMap';
then in my application pinch to zoom is not working. or in fact sliding of map is not working properly(it slides to one direction and sometimes doesn't even slide. many issues).
but when I use api source as
https://maps.googleapis.com/maps/api/js?key=XXX&sensor=true&libraries=places&callback=initialize";
then pinch to zoom is working and even sliding is working properly. But if I replace this with above 'api source' then info window that I created for above api is not opening.
Any Suggestion ? What to do. Is there any other api source I should use ?

Yes, 3.9 is older version and has pinch zoom broken on safari.
Try upgrading to a later version, or simply use the latest version like you have put on the non-versioned url

Related

OpenLayers (2.13.1) zoom/pan has stopped working

I have a legacy product which utilises an older version of OpenLayers (specifically 2.13.1 - I had it on a sversion 2.12 originally and upgraded to 2.13.1 to see if it rectified my problem - it didn't).
The problem is that recently, without any code changes having been made, the zoom in/out and drag-panning do not work - the map just stays where it is, zoomed in at the initial level.
I can see that whenever the zoom or pan controls are triggered, a request is made to a Google Maps URL (e.g. http://maps.googleapis.com/maps/api/js/StaticMapService.GetMapImage?1m2&1i524027&2i524088&2e2&3u12&4m2&1u523&2u400&5m5&1e3&5sen-US&6sus&10b1&12b1&token=39368)
However I can also see that this just returns a blank, black image.
I can find no sign of this functionality having been deprecated and I'd really like to avoid the inherent time cost of upgrading to version 3 on a legacy application.
Any ideas? Any help would be much appreciated.

Polymer Gestures - Pinch Event (0.4.2)

On this page:
https://github.com/Polymer/polymer-gestures
it says that the "pinch" gesture should already be developed but other ones like hold, holdpulse and release shouldn't, playing with the provided sample:
http://polymer.github.io/polymer-gestures/samples/simple/index.html
I cannot recreate the pinch gesture no matter what, but hold, holdpulse and release keep coming out quite easily, do you know what can be the case?
I've created a simple jsfiddle but it's quite hard to use it on a mobile:
<div on-pinch="{{pinchAction}}" on-tap="{{tapAction}}">{{txt}}</div>
http://jsfiddle.net/mLT5G/77/
I'm using Google Nexus 5.0 either with most recent Chrome or Chrome Beta.
Thanks!
PS In this example:
http://jsfiddle.net/Lhwc6woa/
I cannot get any events coming from the second finger, so I guess that's why pinch doesn't work..
It looks like it was a temporary issue, it works at the moment, you can check that out using a jsfiddle attached above.

How can I force Google Map to Lite Mode (no WebGL)

IE11 cannot handle the WebGL version of Google Maps. For example, try dragging the map around on this page:
https://developers.google.com/maps/documentation/javascript/examples/map-simple
If you visit maps.google.com, however, you will see it uses lite mode (canvas) and it works much smoother. If visiting that page doesn't use canvas mode automatically, go to this URL:
www.google.com/maps/preview/?force=canvas
I'm developing against the Maps javascript API, so I need to know how to force this mode so my IE11 users aren't met with a terrible experience.
Any issues you are seeing with the simple map example noted above are unrelated to webgl: The JS API currently uses WebGL only for displaying Street View, and then only for certain OS/Browser combinations (and not currently ie11).
I was able to view the page in ie11 on a VM and it seemed ok. Given it is not a webgl issue, can you be more clear what problem you are having in IE11?
Use:
GoogleMapOptions options = new GoogleMapOptions().liteMode(true);
You have more information at:
https://developers.google.com/maps/documentation/android-api/lite

Google maps icon color

Currently you can use googles chart api to load custom markers with different colors
See here: https://developers.google.com/chart/image/docs/gallery/dynamic_icons
But this has been deprecated. So to ensure that my website works in the future what should I be using?
Or is there some simple way of defining the color of the markers using css or something?
instead of using a deprecated library I found http://code.google.com/p/google-maps-utility-library-v3/wiki/Libraries#StyledMarker which works perfectly :)

Google Maps Javascript API V3 scroll less responsive than simple google map embed

I am working on a store locator web app and I have a problem with the scroll. The scroll/zoom works only if I scroll really intense.
This problem is on their demo codes as well:
https://developers.google.com/maps/documentation/javascript/examples/
https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simple
But if you scroll on http://maps.google.com/ the scroll works really well.
Do you know any solution for this?
Stated in my comment to the OP:
I've observed this in IE8 and maps api v3. This is due to the tiles fading in and out, as far as I can see so I sniff browsers and if my users are using IE8, I serve them up a v2 map where the scroll/zoom works much much better. As far as I know, there's no way to turn off the tile fading when zooming/panning in v3

Categories

Resources