Google Maps shows “For development purposes only”

Google Maps is no longer free. You have to associate a credit card so that you can get billed if your site has requests that exceed the $200 credit they give you monthly for free. That is why you get the watermarked maps. For more information, see: https://cloud.google.com/maps-platform/pricing/ Update: A common problem with the new … Read more

Disable mouse scroll wheel zoom on embedded Google Maps

I was having the same problem: when scrolling the page then the pointer becomes over the map, it starts to zoom in/out the map instead of continuing scrolling the page. 🙁 So I solved this putting a div with an .overlay exactly before each gmap iframe insertion, see: <html> <div class=”overlay” onClick=”style.pointerEvents=”none””></div> <iframe src=”https://mapsengine.google.com/map/embed?mid=some_map_id” width=”640″ … Read more

JSON to pandas DataFrame

I found a quick and easy solution to what I wanted using json_normalize() included in pandas 1.01. from urllib2 import Request, urlopen import json import pandas as pd path1 = ‘42.974049,-81.205203|42.974298,-81.195755’ request=Request(‘http://maps.googleapis.com/maps/api/elevation/json?locations=”+path1+”&sensor=false’) response = urlopen(request) elevations = response.read() data = json.loads(elevations) df = pd.json_normalize(data[‘results’]) This gives a nice flattened dataframe with the json data that … Read more

How to get complete address from latitude and longitude?

Geocoder geocoder; List<Address> addresses; geocoder = new Geocoder(this, Locale.getDefault()); addresses = geocoder.getFromLocation(latitude, longitude, 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5 String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex() String city = addresses.get(0).getLocality(); … Read more

Auto-center map with multiple markers in Google Maps API v3

There’s an easier way, by extending an empty LatLngBounds rather than creating one explicitly from two points. (See this question for more details) Should look something like this, added to your code: //create empty LatLngBounds object var bounds = new google.maps.LatLngBounds(); var infowindow = new google.maps.InfoWindow(); for (i = 0; i < locations.length; i++) { … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)