How to get coordinates near to specific coordinate using rails? - ruby-on-rails-3

I have a RoR app which has a feature allowing users to add markers in a google maps. This markers are saved in a model that have latitude and longitude attributes.
Supposing that an user placed and saved a marker in a specific location, Stonehenge for example, how can I verify if have any other markers in 250 meters radius of Stonehenge?
Any help will be really appreciated!
Thanks everyone!

Look into the geocoder gem. It can convert addresses to lat/lon and ties into active record to do "find me things near this thing" queries.
https://github.com/alexreisner/geocoder/

Related

How can I get more accurate results with Street View Image Metadata?

I'm using the Street View Image Metadata API to find out if a Street View image is available for land I'm looking to purchase, but I'm finding the results aren't always accurate. For example, I use the latitude/longitude coordinates of the center of the property for the queries. Since this point is in the middle of the property, it can sometimes be hundreds of feet away from the street, but still visible by Street View. When I search the coordinates in Google Maps, it provides a street view image, but when I use the API, it says "zero results." See below for examples.
Location: 37.640141,-120.347427 Google Maps View
Location: 37.637823,-120.340287 Google Maps View
As you can see in each of the examples, Street View provides an image of the location, but the API says "zero results." Any ideas for how to get better results for these types of searches?
To use the API you should use the following format:
https://maps.googleapis.com/maps/api/streetview/metadata?size=[*SIZE X*]x[SIZE Y]&location=[LATITUDE],[LONGITUDE]&fov=80&heading=90&pitch=-20&key=[API KEY]
It returns the metadata you wanted including the following information:
date,
location (lat, long), and
panorama ID

Google maps overlapping using vue2-google-maps

In my project some markers has the same lat and lng so they overlapping,
I'm using this package vue2-google-maps for google maps.
How i can show for example on map a number, shows how many markers are overlapping ?
Or any solution would help.
Thank you.

How to open OSM in PyQt5 widget?

How do I get longitude and latitude of a certain place using OpenStreetMap in PyQt5. I found a solution using Google Maps but I need a free solution for this because I just want to get latitude and longitude of a certain place, nothing else.

ARCGIS API 4 -- Custom marker images for each point or address

There are several examples in the API, but for some reason, what I think the biggest feature is eluding me for some reason. I have a list of points and each point needs to be represented by a different icon. I also may have layers that use the same icon which I can find, just not the option for different icons/markers. An example of this would be greatly appreciated!!
I found out how to use the Graphic option to add an array of points that have a different url for their markers (symbols). This used the Picture Marker type. The beauty of JSON!!

Setting up coordinate system in Map Tiler

I am creating Map tiles based on Map Image using Map Tiler software.
Now in that as a first step i selected Map Image from system.
Than i have to set the coordinate system for that i have following options :
See this image:
I choose second option from it. that is WGS84 - Latitude and longitude (EPSG:4326)
In that i have this type of algo to fill up with the coordinate values :
GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84", 6378137,
298.257223563, AUTHORITY["EPSG","7030"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0,
AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433,
AUTHORITY["EPSG","9108"]], AUTHORITY["EPSG","4326"]]
But its not working for me. The tiles are creating well but when i am trying to create the database using Map2Sqlite software than it takes always static lat-long although i specified the Lat-Long of particular region.
Can anyone suggest which of the option mentioned in above Image should i choose ?
Also if there is any alternate way to create tiles & convert it to Sq Lite db than please suggest me.
As i checked map2sqlite is working well. But when i create tiles at that time passing the coordinates is somewhere wrong.
So anyone can please suggest me while creating tiles from Map image how to pass Coordinates of our region.
Any suggestions or hints will be highly appreciated.
Thanks.
Have a look at this video:
https://www.youtube.com/watch?v=eJxdCe9CNYg
It shows a step by step guide how to overlay an image on top of Google Maps or OpenStreetMap.
MapTiler (http://www.maptiler.com/) generates tiles compatible with the popular global mercator system automatically - these are compatible with most of the API and SDKs.