Google Streetview: Show markers within given radius - javascript

I have added custom markers to google maps streetview view without a problem. I am now wanting to show the markers I have added only when the user is within a few degrees of the markers coordinates and not visible when panning around street view from farther distances. I have seen a few forum posts about removing markers when in a given radius but not the reverse.
Litte more background... I am trying to make a simple easter egg hunt game using the streetview api.
Any thoughts are greatly appreciated!

You said "I have seen a few forum posts about removing markers when in a given radius but not the reverse", use that mechanism and reverse the test.

Related

Create own markers in Google maps Api Javascript

newcomer here, been searching through google but not finding the help i need.
Im making a website for outdoor gyms, where I have placed my markers with coords(may have to stash them in mysql) but currently in my code in a markers array.
I want the user to be able to input their adress/county to find the closest outdoor gym/ running track based on their preference. The search should search through the markers and find the closest one in that area.
Until now, i have the map, the markers, the searchfunction is a big obstacle for me atm.
I appreciate any kind of help.
you could save markers by their coordinates (longitude and latitude) on your db. Then, you could use leaflet to load googleMap or openstreet map and draw your markers.
This is an useful tutorial https://scotch.io/tutorials/making-mean-apps-with-google-maps-part-i. I think it is the good point to start.

How to rotate a map in Javascript(Meteor/famo.us)

In my Meteor/Cordova/famo.us App I need a map that can be rotated with two fingers, zoomed in and out and (ideally) the names (street, city etc.) should stay horizontally aligned.
The reason is that I haven't found a (free) map like leaflet.js, Google Maps etc. that can rotate in JS. Google Maps SDK for Android and iOS respectively can do this, but the corresponding plugin (plugin.google.maps) led to trouble with famo.us.
The rotation could be done with a famo.us Surface, and I've been told that in leaflet one could pull separately the map tiles and the names (vector/jpeg?).
I apprechiate your help.
Map rotation isn't possible in Leaflet. Read this answer: https://stackoverflow.com/a/22938733/2019281. However, it is possible in openlayers but it would also rotate the labels since they are embedded in the maptiles. See this example: http://openlayers.org/en/master/examples/rotation.html. You could use a tilelayer without labels and add create your own separate layer with vectorlabels and counterrotate those. This would be a very complex solution and i guess will put an enormous strain on your performance since you're talking about a mobile solution. I would rethink the concept.

Adding new places in google maps

I am using Google javascript api Currently. I would like to add new places like add small villages in the map, these small village does not appear in google map even when I am highest zoom. I know villages Lat/Lang and would like to add them when someone zoom in map (placed in my website). I can use Marker to accomplish similar, But it is not same as having places by default appear on map.
I tried searching stackoverflow and elsehere on net, But could not find any references. If someone can please sugggest on it
You need to request it from google: google.com/mapmaker
You need to drew a polygon of the city borders.
every request must to be approved by google.
Hope its help.
I used MarkWithLabel to accompalish http://google-maps-utility-library-v3.googlecode.com/svn/tags/markerwithlabel/1.1.8/docs/examples.html

how to draw a circle around the marker on google fusion tables?

I'm using google fusion tables I want to draw a circle around my markers. how do I do that? if there is something I should write in the javascript what is it? am not a web developer so I dunno :S
See the Circle overlay documentation The real issue will be getting the location of your markers.

Highlighting whole street with some maps API

Is there any way to highlight/display on Google/Bing/(any other map provider) Maps whole street (from the beginning of the street to the end of)?
I know the existence of Polyline in Google Maps API, but it's just connecting two latitude points, and there is no way of making it automatic so I could display any street in some city.
Also I was thinking about Directions, but many street are 2 way, there is no guarante that you will mark whole street and it's just now user friendly. Example
You may want to check Mike Williams' article on how to snap points and polylines to streets with the Google Maps API:
Snap points (and polylines) to street
Especially this example:
Click on the map and a path will be drawn that follows the streets.
Take a look at OpenStreetMap. (Google and Bing won't let you access their underlying street data.)
You can show a map with OSM tiles, and use the API to query for the features you're interested in displaying on the map. OpenLayers is a javascript mapping library that could support this.
Here's a view of Chicago showing street vectors and other features overlaid on top of the map tiles:
http://www.openstreetmap.org/?lat=41.902104&lon=-87.626441&zoom=18&layers=B000FTTT
In Azure Maps you could access the vector tile road layers and use a data driven style based on the name of the road. Here is a tool that inspects the underlying data in the map tiles and highlights things that you click on. This has a lot of the basic functionality that you would need to achieve what you are asking for: https://azuremapscodesamples.azurewebsites.net/?search=inspect&sample=Inspect%20features%20under%20the%20mouse

Categories

Resources