Skip to content
Advertisement

How can I get city name from a latitude and longitude point?

Is there a way to get a city name from a latitude and longitude point using the google maps api for javascript? If so could I please see an example? Answer This is called Reverse Geocoding Documentation from Google: http://code.google.com/apis/maps/documentation/geocoding/#ReverseGeocoding. Sample Call to Google’s geocode Web Service: http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true&key=YOUR_KEY

URL Encode a string in jQuery for an AJAX request

I’m implementing Google’s Instant Search in my application. I’d like to fire off HTTP requests as the user types in the text input. The only problem I’m having is that when the user gets to a space in between first and last names, the space is not encoded as a +, thus breaking the search. How can I either replace

Convert UTC date time to local date time

From the server I get a datetime variable in this format: 6/29/2011 4:52:48 PM and it is in UTC time. I want to convert it to the current user’s browser time zone using JavaScript. How this can be done using JavaScript or jQuery? Answer Append ‘UTC’ to the string before converting it to a date in javascript:

Data graphing with html [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 6 years ago. Improve this question A line chart that updates every couple of seconds and doesn’t

How to detect DIV’s dimension changed?

I’ve the following sample html, there is a DIV which has 100% width. It contains some elements. While performing windows re-sizing, the inner elements may be re-positioned, and the dimension of the div may change. I’m asking if it is possible to hook the div’s dimension change event? and How to do that? I currently bind the callback function to

regex replace just the last charater of a string

This should be an easy one and I couldn’t find it anywhere. How do I replace just the last character of a string with a char from an array? Answer $ matches the end of a string, . matches any character But you should probably use string functions for this:

Advertisement