The newest release version of the Google Maps JavaScript (3.32.13) is conflicting with Prototype.js version 1.7.3.
When I have Prototype included on the page, the Street View of Google Maps will not handle mouse drags to "look around"
Is this a known issue? Any workarounds?
So the problem is that PrototypeJS is overwriting Array.from as an alias to $A() which creates an extended Array object.
IF (big IF) you are not using Array.from to create a shallow copy of an array and expecting the Prototype extended methods, you can remove/comment out the line in prototype.js that is only
Array.from = $A;
In my copy of 1.7.3 it is line 1114
I also struggled with the conflict between Prototype.js and Google API. Removing Prototype.js was not an option as it is deeply engrained in the project. I decided to replace
Array.from = $A;
by
Array.from = Array.from || $A;
in the prototype.js file. It keeps the support for older browsers which do not have Array.from implemented natively. This does not solve the conflict between Prototype.js and Google API on older browsers though!
This site overrides Array.from() with an implementation that doesn't support iterables, which could cause Google Maps JavaScript API v3 to not work correctly.
I also have the same issue. So, I reopened a relevant GM API tkt: https://issuetracker.google.com/issues/72690631
I tried to rename the function collect into prototype.js but it didn't work.
Related
I need to set the night mode Google maps, which will work automatically using the sensor in the phone and manual using the switch. I need some example or documentation
Install the Xamarin.Forms.GoogleMaps Nuget Package (source code available on GitHub)
which has already implemented it on Xamarin.Forms.
You can refer to the MapStylePage sample available here which basically explains you how to create original map styles using MapStyle With Google. You can use the wizard, select the Night theme from there and get the corresponding json style, which you'll use on your Xamarin app.
int currentNightMode = getResources().getConfiguration().uiMode
& Configuration.UI_MODE_NIGHT_MAS
switch (currentNightMode) {
case Configuration.UI_MODE_NIGHT_NO:
// Night mode is not active, we're in day time
case Configuration.UI_MODE_NIGHT_YES:
// Night mode is active, we're at night!
case Configuration.UI_MODE_NIGHT_UNDEFINED:
// We don't know what mode we're in, assume notnight
}
I have an application that uses MapBox's API to stylize the underlying map which uses Google Places. This all worked perfectly fine when running in IOS 7+, but when I try testing this in IOS 8, it immediately crashes with the following error message:
Terminating app due to uncaught exception NSInternalInconsistencyException, reason: 'The layout constraints still need update after sending -updateConstraints to MapView at {0,0}-{320x444}.
RMMapView or one of its superclasses may have overridden -updateConstraints without calling super. Or, something may have dirtied layout constraints in the middle of updating them. Both are programming errors.'
I have been looking around the Web and Stack for a while but have been unable to find anything helpful unfortunately. Any suggestions?
I deleted all Mapbox framework / headers / lib from my project and reinstalled the latest (1.4.1) mapbox static library (libMapbox.a) and the Headers, and everything was ok after that without changing a line of my code.
I'm new Windows Phone Universal App, I need to implement bar/pie chart.
Tried many dll, Metro UI, WinRtXamlToolKit and WinRtXamlToolKit.Controls.DataVisualization
These dll are not working.
Give me good idea to do this on Windows Phone Universal App. How to do chart programmatically.
Thanks
I believe the Telerik has some Chart libraries that cost money ( can't link though as stackoverflow only permits me to post 2 links ( less than 10 rep) ). I have not used it and it is in Beta version at the moment. Google "Rad Chart windows universal apps" and you can read about it.
When I have needed charts for universal apps i have used the Google Chart Tools. You can use https://developers.google.com/chart/image/ even though Google is not developing on it anymore. It is is freakingly easy to use if you do not want to spend time drawing your own Charts. With the API you can request a chart just through a http request. You can setup almost everything and it's really easy to use thanks to the well documented API.
Here is an example of a bar chart i made using the API.
http://chart.googleapis.com/chart?chtt=Karakterfordeling&cht=bvg&chof=png&chs=300x300&chxt=x,y&chco=0076A3&chf=bg,s,65432100&hxr=0,0,50&chxl=0:|2|4|7|10|12&chxr=1,0,20&chbh=40,0,10&chd=t:2,60,70,10,90
All the arguments are passed through the http request and you can set your Chart up using the Live Chart Playground:
These are the arguments for the http request posted above. You can use the Live Chart Playground to set up parameters like below.
chtt=Karakterfordeling
cht=bvg
chof=png
chs=300x300
chxt=x,y
chco=0076A3
chf=bg,s,65432100
hxr=0,0,50
chxl=0:
2
4
7
10
12
chxr=1,0,20
chbh=40,0,10
chd=t:2,60,70,10,90
In code you set the http string as your ImageSource. You can manipulate the http string in your code and adapt the chart parameters/data if needed. I would recommend using a Converter that you bind to from you XAML. Pass your data to the converter and let it return a ImageSource with the http request. If you are new to Converters you can probably find a few posts about it here on stackoverflow.
Don't use DLLs grab the files into your project.
Add WinRTXamlToolkit.Controls.DataVisualization.csproj to your solution and reference it in the main project and add this to your page.
xmlns:charting="using:WinRTXamlToolkit.Controls.DataVisualization.Charting"
xmlns:datavis="using:WinRTXamlToolkit.Controls.DataVisualization"
Look at the samples project http://winrtxamltoolkit.codeplex.com
Unfortunately, winrtxamltoolkit is only for WinRT; VS 2013 doesn't allow adding of project references of that kind to WinPhone projects.
i believe that in google API version 2, it could eventually call this method out. Moreover they do share or happen to be using the same type of coding.
However in version 3, i could not set this layer to the map neither via "layer.setMap(map)" because this esri method does not has this function , nor "map.addOverlay(layer)" because this function belongs to version 2 which has been taken down. can i ask what is the method replacing "map.addOverlay(layer)" in version 3. i have try using custom overlay function, but is comes out as a image which doesn't match the result i want.
** take note : ArcGISDynamicMapServiceLayer is to call a time aware data layer from esri
Have a look at these examples:
http://gmaps-utility-gis.googlecode.com/svn/trunk/arcgislink/docs/examples.html
In my drupal site, I have installed the gmap module. But that is in version 2.115. Now I got a mail from google that update the google API version. I have generated the API key version 3. But no idea about implementing them to the module files.
drupal_set_html_head(' $query))) .'" type="text/javascript">');
This I changed to
drupal_set_html_head('');
Also in gmap.js
obj.map = new GMap2(elem, obj.opts); changed to obj.map = new google.maps.Map(elem, obj.opts);
But after adding this, Javascript is required to view this map. is showing.
Please help me
See this thread on d.org. There are several patches and solutions.