On Leaflet I can create a new circle easily given the centre and the radius: The circle above is created and drawn without problems, so it is all. However, if I wanted now to create and draw a rectangle that which bounds the circle, it does not work. Here is what I did: The size of the rectangle that I
Tag: latitude-longitude
Lat/Long equation in Javascript
I am trying to find an equation for finding the lat/long point between two lat/long points in Javascript. It would work something like this. getMiddle(lat1, lng1, lat2, lng2) <= would return [lat3, lat3] halfway distance wise (going around the earth obviously). I found this: Link Date: 10/11/2001 at 11:41:08 From: Doctor Rick Subject: Re: Determining lat and long of a
How to get the current viewport of the map out of OpenLayers as geometry, bounding box or wkt?
I’m trying to find some hints where I should search for this topic but I’ve nothing found – and I spent many hours on this. I’m also trying to get the current coordinates out of the current displayed viewport from the OpenLayers map to add only these vectors that are in the current bounding box of the current viewport. Answer
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