I am having a data set of say 10000 GPS points. I need to find GPS points depending on how frequently the area is visited by using the GPS data set I have. I am looking for a solution either by using google maps or by using mongoDB, but unable to find any clue how should I achieve this. Can anyone help me regarding this?
sample data = [{18.5204303,73.8567437},{18.520457, 73.856697},{18.520400, 73.856800},{18.520156, 73.857092},{18.519879, 73.857561}]
Out of the given data set first three point are near to each other.
So, whenever I will ask for frequently visited area from the given data set I should get result as [{18.5204303,73.8567437},{18.520457, 73.856697},{18.520400, 73.856800},{18.520156, 73.857092}]
I got the solution using google heatmap. I just passed array of gps points to heatmap and the heatmap displayed it in proportion of frequent access to the locations. That is what I was trying to achieve
Related
I need to get features in a certain radius around specific point. Let's say i have an address and need to count all metro stations near this address.
Metro stations are uploaded to mapbox side as a dataset.
How can i list fetch and process these features using mapbox API?
Additional question:
Is there any possibility to get them from mapbox style (layer) attached to map after style is loaded. I can't find right event for fetching renderedFeatures (there is multiple edge cases, when user can zoomin and renderedFeatures will contain less points then fit in 1km radius)
You can access your dataset using the Mapbox Dataset API. This doesn't require Mapbox-GL-JS - it's a totally separate API, and the dataset doesn't need to be displayed anywhere.
You can then use the Turf library to filter points within a certain distance of the address, using the distance() function.
Update
The correct answer these days is to use the tileQuery API, which takes a radius parameter.
I have an array of places in LatLng, across the US. I've pulled my current location, and I want to display the places in that aforementioned list, that are within a certain distance of my current location. This is somewhat like a places radar search, except I already have my locations, I'm just trying to display relevant ones. Any advice?
Not tied to google maps API, but it is free with a high limit of requests
I've been exploring using, but I can't figure out how to do what I'm trying to.
link 1
link 2
https://developers.google.com/maps/documentation/distance-matrix/intro?hl=en
There are plenty of Map APIs that allow you to enter two locations and calculate the distance between them. It is my understanding that LatLngs are an accepted format for the points you are calculating between.
We have a Google Local profile (or Google Places) for our business and we have added multiple locations for each store. The requirement is to embed a map in each store page of our website with the accurate location of the store and to display an infoWindow just like it's been displayed from Google's map. Example below:
I have read the API's documentation but I can't seem to find a clear answer as to the way of referencing a store that already exists in the map. If I add the address of the store, I usually have a 2nd marker that is not on the exact location of the store. Example below:
If I add longitude and latitude I get 2 markers again (one on top of the other) but then again these markers do not relate to each other as they have different infoWindows. And one major issue is that by using the Places API I can't get the info just like Google does (I get undefined). Example:
Questions:
How can I really relate (or reference) to the store's location and the Google's Place location and have just one marker with the Google's info in it?
How can I reference to a specific store based on Google's Place profile, which has a business with multiple store locations and link it to the "Store" marker that already exists in the map?
Attempts:
I tried locating the store based on PlacesService and nearbySearch with a keyword of the store name. Example here. The problem is that I have 2 markers on the map if I zoom in at maximum level.
One more issue is that I have 81 stores and it's hard to hard-code the coordinates for each store in each webpage. So, since I have the address in each page I tried geocoding to get longlat. This wasn't very accurate way because it seems that geocode snaps to a nearby area and not exactly on the store. Example here.
I tried PlacesService with the reference string for identifying the store's location based on Google's Place profile. Example here. However, there's not an easy way to retrieve the reference string for each store and another issue is that I need hardcoded coordinates to center the map in the area of the store (too much work for 81 stores).
Expected solutions/suggestions:
I would like to fully utilize our Google's Places profile that includes all the stores info. BTW, each store now has a Google+ page created automatically by Google. I would like a suggestion on how to utilize the automatically created Store marker (like in 1st picture) and have the exact same infoWindow like Google's default (1st picture) with some sort of a reference ID from our Google's Places profile.
I apologize for this long question but I had to further explain all my attempts.
I'm trying to create a map that shows county/district areas using Google Maps that will allow users to click on the area to retrieve relevant pop up information.
I have two datasets that I think would help, one being a list of UK Postcodes which would in turn allow me to determine different postal areas and the other is a dataset from Ordance Survey that contains province borders (county/district borders).
I've looked into KML Files and ImageMap but I'm not sure how to create these areas using the data I have?
I'm looking to achieve the sort of map that is used here:
http://content.met.police.uk/Page/YourBorough
Any help is greatly appreciated!
Thanks.
The way to work with Google maps is by using their api closely. You cannot go with simple image mapping.
Try those two links for starters:
https://developers.google.com/maps/documentation/javascript/examples/polygon-simple
and
https://developers.google.com/maps/documentation/javascript/reference#Polygon.
In short - you may need to draw a polygon for every area, bind a click event to it, then show Info Window with the relevant information for the user.
In case you're new to google maps, you may need to take more time inspecting their Api and the examples they give.
Best regards.
Im trying to highlight specific building within a map using the google maps v3 api. I was wondering if anyone had any idea how to do this. I've been looking through google api documentation and come across nothing at the moment.
For example: http://goo.gl/maps/GyrDB - This is a map of a section manhattan, as you can see the 3d building. Im trying to highlight specific ones on hover.
Thanks :D
If you have information about where the building is, then you can use a Polygon to highlight it. If you don't have information about where the building is, then you are probably out of luck. The Google Maps API doesn't have any way of interacting with the map at that level.
Now, I suppose that one thing you could do is:
download the Google Maps tile,
find the point in the image that the user clicked on,
do a flood fill of that point with some awful colour,
set to clear all the pixels which are not the colour,
overlay that image on top of your map
You would also need to be clever about buildings which lie in more than one tile.
HOWEVER, this might run you afoul of the Terms of Use. I know that they disallow modifying the artwork; I am not sure if this would count as modifying the artwork; you'd need to look carefully at the TOU and maybe ask a lawyer. Or ask Google. (Don't ask me, I am not a lawyer.)
In many countries, every building is a cadastral parcel and there Web Map Service (WMS) layers showing them, provided for free by state bodies.
Using these layers, you can get building polygon coordinates. For ex: https://snag.gy/WtU7ZT.jpg