google-maps-markers

Android REQUEST_DENIED Google places API

假装没事ソ 提交于 2019-12-12 05:38:49
问题 I am working on Android Google maps application but the query string i am using to get results of places near by the user is not working. http://maps.googleapis.com/maps/api/place/search/json?location=123.666,33.166&radius=50000&sensor=false&types=establishment&name=hotel&key={myKey} I am using this link to obtain a Maps API key. here is the response i am receiving. { "html_attributions" : [], "results" : [], "status" : "REQUEST_DENIED" } Thanks 回答1: You need to generate the Places API key

Can't get Google Maps Geocode to work

心不动则不痛 提交于 2019-12-12 05:15:16
问题 Expected Behavior: I'm trying to have a map that displays user's current location but when the user searches for a location, a marker appears on the location. Current Behavior: Only the current location code works. I can't figure out what is the problem here. Both of these functions are very generic. Here is the javascript: if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showCurrentLocation); } else { alert("Geolocation API not supported."); } function

Android - Google Map make marker sticky

半腔热情 提交于 2019-12-12 04:56:50
问题 I have following marker code on my MapFragment. I want this marker stick to it's position. Means I want marker at center position in map and when I move/drag map then marker shouldn't get moved. How to do that with following marker? PlaceMarker = PlaceMap.addMarker( new MarkerOptions() .position(new LatLng(0, 0)) .draggable(true) .title("Drag Me")); PlaceMarker.showInfoWindow(); Thanks 回答1: You can add a listener when the user pans the map and set the marker on the center. mMap

problems with google map markers

て烟熏妆下的殇ゞ 提交于 2019-12-12 04:42:32
问题 as you can see at my test.php the marker ist working fine. but when I zoom the map for an better overview the marker is going to north??? If I zoom a lot, the marker moved to North sea :-( Is this a known bug? or am I doing something wrong? <!DOCTYPE html> <html> <head> <title>MyRange Driving Ranges world wide </title> <meta name="viewport" content="initial-scale=1.0, user-scalable=yes" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 30px; padding: 0px } #map

How to show/hide markers from XML file without refreshing the page

我与影子孤独终老i 提交于 2019-12-12 03:56:59
问题 I have a map described here. Markers from XML files are loaded only if the checkbox is checked. When you uncheck it, they are still displayed until the page is refreshed. How is it possible to show/hide them when the checkbox value is changed? Simple onclick="initialize();" doesn't work and would be very inefficient anyway. I can't avoid having two xml files and can't use one file with categories instead of them. 回答1: Here is an example which shows/hides markers based on their categories

update marker position in Google Maps in IOS app

可紊 提交于 2019-12-12 03:54:52
问题 I need to update the marker position on the drawn route till it reaches its destination.Now here is the code for accessing server: NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"https://maps.googleapis.com/maps/api/directions/json?origin=%f,%f&destination=-32.90,151.80&waypoints=-33.30,151.50&alternatives=true",marker.position.latitude,marker.position.longitude]]; After this I am just updating the position of marker overtime I calculate the new position.The question arises how

Add markers to map from SQLite, and center/fit them in zoom (Android)

為{幸葍}努か 提交于 2019-12-12 03:28:51
问题 I really need help populating a map with markers from coordinates stored in my database. I've worked with populating listviews from SQLite, and I can add markers to a map, but I cannot figure out how to add markers from an SQLite database. Also, if I could get some help with centering the markers on screen and zooming in where they all fit, that would be awesome! Heres my code so far: * Updated Code * ALLMAPACTIVITY public class allmapactivity extends MapActivity { GeoPoint GeoP; MapView mapV

Retrieve saved LatLong value from Firebase and show in marker

只谈情不闲聊 提交于 2019-12-12 03:27:51
问题 I have previously asked the similar question where I had issue with saving the data in the firebase cloud. I managed to store the latitude & longitude data in the firebase database using following code @Override public void onMapReady(GoogleMap map) { mMap = map; // Use a custom info window adapter to handle multiple lines of text in the // info window contents. mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() { @Override // Return null here, so that getInfoContents() is called

Google Maps: Attaching events on polyline icons

余生长醉 提交于 2019-12-12 03:27:44
问题 I have a page where I'm trying to simulate ship locations on a map. Some of these ships are at a location a percentage of the way on a polyline, others are are at a single point marker. With the ships that are a percentage of the way along a polyline, I'm able to display the icon correctly. What I'd like to do is attach events purely on that icon, and not on the whole polyline. My code is at http://www.cleancruising.com.au/map_allShipLoc2.asp I've also tried to alternatively calculate the

Google Maps API draw a text from GeoJSON point geometry

烂漫一生 提交于 2019-12-12 03:15:21
问题 I've got geoJSON data like this: { "type": "FeatureCollection", "features": [{"type": "Feature", "properties": {"text": "Street Foo", "Font": "25", "Angle": "0.99999"}, "geometry":{"type":"Point", "coordinates":[44.4878559081156,9.76673954155489]}} ] } I would like to draw a text "Street Foo" with Font size 25 and 0.999 radiant angle inclination with Google Maps API. I tried this: var mapOptions = { zoom: 14, center: new google.maps.LatLng(44.4878559081156,9.76673954155489), mapTypeId: google