Google Maps API – Get Coordinates of address

What you are looking for is called Geocoding. Google provides a Geocoding Web Service which should do what you’re looking for. You will be able to do geocoding on your server. JSON Example: http://maps.google.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA XML Example: http://maps.google.com/maps/api/geocode/xml?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA Edit: Please note that this is now a deprecated method and you must provide your own Google API … Read more

Google Maps V3 – How to calculate the zoom level for a given bounds

Thanks to Giles Gardam for his answer, but it addresses only longitude and not latitude. A complete solution should calculate the zoom level needed for latitude and the zoom level needed for longitude, and then take the smaller (further out) of the two. Here is a function that uses both latitude and longitude: function getBoundsZoomLevel(bounds, … Read more

What parameters should I use in a Google Maps URL to go to a lat-lon?

This is current accepted way to link to a specific lat lon (rather than search for the nearest object). http://maps.google.com/maps?z=12&t=m&q=loc:38.9419+-78.3020 z is the zoom level (1-20) t is the map type (“m” map, “k” satellite, “h” hybrid, “p” terrain, “e” GoogleEarth) q is the search query, if it is prefixed by loc: then google assumes … Read more

Preferred order of writing latitude & longitude tuples in GIS services

EPSG:4326 specifically states that the coordinate order should be latitude, longitude. Many software packages still use longitude, latitude ordering. This situation has wreaked unimaginable havoc on project deadlines and programmer sanity. The best guidance one can offer is to be fully aware of the expected axis order of each component in your software stack. PostGIS … Read more

Resize Google Maps marker icon image

If the original size is 100 x 100 and you want to scale it to 50 x 50, use scaledSize instead of Size. const icon = { url: “../res/sit_marron.png”, // url scaledSize: new google.maps.Size(50, 50), // scaled size origin: new google.maps.Point(0,0), // origin anchor: new google.maps.Point(0, 0) // anchor }; const marker = new google.maps.Marker({ … Read more

Google Maps Android API v2 – Interactive InfoWindow (like in original android google maps)

I was looking for a solution to this problem myself with no luck, so I had to roll my own which I would like to share here with you. (Please excuse my bad English) (It’s a little crazy to answer another Czech guy in English 🙂 ) The first thing I tried was to use … Read more

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