google-maps,google-maps-api-3,google-street-view
2 possible options(there may be more): prevent the streetView from being visible: google.maps.event.addListener(map.getStreetView(), 'visible_changed', function(){ if(this.getVisible()){this.setVisible(false)} }); try to make the streetview-link in the infowindow un-clickable .gm-sv-label{display:none;} .gm-wsv{pointer-events:none;} I would suggest to use both options together, because the 2nd option may fail in the future(the classNames may change)...
you can just use: map.setMapType(GoogleMap.MAP_TYPE_NONE); Refs: https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap#setMapType(int) https://developers.google.com/android/reference/com/google/android/gms/maps/GoogleMap#MAP_TYPE_NONE...
ruby-on-rails,ruby,json,google-maps,hashes
You could reject users whose lat or long is nil: users_with_location = users.reject { |user| user.lat.nil? || user.long.nil? } Or reject in place (remove them from your users variable without making a copy): users.reject! { |user| user.lat.nil? || user.long.nil? } So your entire code would be something like: users =...
javascript,arrays,google-maps,google-maps-api-3,polygons
Create a function to return the click listener function. Pass the index and the polygon into that function so you get function closure on them to keep them associated: function attachInfoWindow(newPoly, i) { return function (event) { var eventNo = newPoly.get("eventNum"); var outTime = newPoly.get("offTime"); var resTime = objArray[i].restoreTime; var...
Try this is in the format you need. The first with marker the second without https://www.google.com/maps/place//@46.090271,6.657248,16z https://www.google.com/maps/@46.090271,6.657248,16z you must add the place/ between maps/ and /@...
javascript,jquery,json,google-maps
Two suggestion first:: you can assign the coordinates without the $.each(polygons, function (i, n) { ..... } you already have the cooordinate in javascrip format [[......],[.....]] then you don't need to reassign to paths[] second seem you have a nested [] of to much try with your format and then...
android,google-maps,android-fragments,supportmapfragment
Based on post How to put Google Maps V2 on a Fragment Using ViewPager (see Brandon Yang's answer), I changed the MapaFragment.java code using MapView, and it worked. Like this: public class MapaFragment extends Fragment { Context mContext; private GoogleMap mMap; MapView mMapView; private Location location; private final static String...
javascript,google-maps,google-maps-api-3,svg
After @geocodezip mentioned that it looked too big, I found the solution from another stackoverflow post. Even though I had tried to resized the image in Inkscape to be a small 24 pixel icon, this wasn't sufficient to make the icon appear at all. I found this post, which was...
java,android,google-maps,google-maps-android-api-2
After seeing your other question, it looks like the non-map Activity is getting the onProviderEnabled() callback, but your map Activity is not getting it (unless the GPS radio is enabled during use of the map Activity). Instead of only calling registerForUpdates() in the onProviderEnabled() callback, call it in onCreate() if...
javascript,google-maps,google-maps-api-3,google-maps-markers
This is not a solution, and a bit half-assed. A year old nodejs-project I dug up. Maybe it can give you a few ideas. Yeah, I realize you want a browser solution. (Sorry!) Browser javascript doesn't work with files very well. But you absolutely can use data URI to make...
The direct cause of the issue is that the debug version of an app can work without the google_maps_key being correct. I had the api_key entered, but incorrectly somehow. I'm not sure exactly what changes solved the issue, but I deleted some comments and spaces in the google_maps_api.xml. This solved...
Same problem here: I've corrected it, change clearMarkers method this way: set_map(null) ---> setMap(null) google.maps.Map.prototype.clearMarkers = function() { for(var i=0; i < this.markers.length; i++){ this.markers[i].setMap(null); } this.markers = new Array(); }; Documentation has been updated to include details on the topic: https://developers.google.com/maps/documentation/javascript/markers#remove...
you are show and hide only the last polygon in your code. The solution is based on an array of polygons and a for cicle to show or hide all the polygons. see this jsfiddle for the complete functioning version. these are the main parts extract var polygons = []...
javascript,html5,google-maps,google-maps-api-3,html5-canvas
According to the documentation: scaleControl enables/disables the Scale control that provides a simple map scale. By default, this control is not visible. When enabled, it will always appear in the bottom right corner of the map. So unfortunately, you won't be able to put it in the bottom left position....
You are getting confused by two languages being present. You forget that your Javascript will run on the client, in the browser. PHP will run on the server. The only way to get the JavaScript value to your server is to HTTP POST/GET it to the server, using a hidden...
add an infowindow with a form at the point clicked var formStr = "<input type='text' id='text4mrkr' value='marker text' /><input type='button' value='submit' onclick='addPlace();' />" google.maps.event.addListener(map, 'click', function (e) { infowindow.setContent(formStr); infowindow.setPosition(e.latLng); infowindow.open(map); }); capture the data from the form and add (in this case) a marker with an infowindow containing...
ios,objective-c,google-maps,google-maps-sdk-ios
First check out following things are there or not. locationManager = [[CLLocationManager alloc]init]; locationManager.delegate= self; if([locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]){ [locationManager requestWhenInUseAuthorization]; } [locationManager startUpdatingLocation]; _mapView.myLocationEnabled = YES; _mapView.settings.myLocationButton = YES; If Everything is there and if you are testing on Simulator then try to change the location in Simulator from debug Tab,...
android,google-maps,android-fragments
You should use a FragmentActivity (or AppCompatActivity), and keep using your Fragment: <fragment xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/map" android:name="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MapsActivity" /> I don't see the usage of MapView anymore, nor in the official guides as of now. You should use SupportMapFragment....
You can't do it this way because at the end of the loop, "i" will always be the last index. And of course when you click on a marker, "i" value inside the callback is the last index, so you should always have the last picture displayed. Just put insertion...
android,google-maps,android-studio,google-play-services,google-play-developer-api
If you are using Android Studio open the build.gradle file and enter inside dependencies dependencies { compile 'com.google.android.gms:play-services:4.2.+' } more info Add Google Play Services to Your Project...
ruby-on-rails,ruby,google-maps
Geocoder returns an array of results: require 'geocoder' result = Geocoder.search '53593' result.class #⇒ Array < Object So, here you go: result.first.city #⇒ "Verona" ...
javascript,html,ajax,google-maps
You are setting marker1 as a Javascript object and not as a google maps marker object, and so it doesnt have the setMap() method that google markers do. To set it as a maps marker object you need to use var marker1 = new google.maps.Marker({ ...
android,google-maps,hyperlink,google-maps-android-api-2,onclicklistener
It looks like it is not possible to make any individual item in an InfoWindow clickable. Refer to this answer. Also, in the documentation here: As mentioned in the previous section on info windows, an info window is not a live View, rather the view is rendered as an image...
Google Maps API for Work client IDs are restricted to URLs specifically authorized. If you try to use your client ID at a URL that has not been authorized, you will receive an error message. Reference Your app is authorized from your PC's IP only, so using your key...
javascript,jquery,google-maps,google-maps-api-3
Edit: Turns out you have to set the .ajaxComplete handler before you make the ajax request since you have set async to false. Here is a working example. I would suggest saving the markers in an array if you intend to use the markers later on(i.e.: move them, or remove...
javascript,html,asp.net,google-maps
innerText is one of the ways to retrieve text content and like most of the ways it isn't supported in all browsers. If I am correct innerText isn't supported in Firefox, so if you are testing in Firefox that might be the reason why you can't read the value. What...
you have three issues: you need to close your initialize function You are missing a semicolon at the end of mapProp2 You need to set the size of the map the following should get you started: function initialize(){ var mapProp1 = { center: new google.maps.LatLng(39.336822, -84.218045), zoom:9, mapTypeId: google.maps.MapTypeId.ROADMAP };...
If you specify the defaultColor and give Canada no value, this will do exactly what you want. So something like: google.setOnLoadCallback(drawRegionsMap); function drawRegionsMap() { var data = google.visualization.arrayToDataTable([ ['Country', 'Popularity'], ['Germany', 200], ['United States', 300], ['Brazil', 400], ['Canada', null], ['France', 600], ['RU', 700] ]); var options = {defaultColor: 'red'}; var...
ios,google-maps,google-places-api
You can do a HTTP Nearby Search Request, in the request parameter you can set the types=gas_station. In iOS, you can use NSURLSession to do a http request. Sample code: let requestURL = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=-33.8670522,151.1957362&radius=2000&types=gas_station&key=YOUR_API_KEY" let request = NSURLRequest(URL: NSURL(string:requestURL)!) let session = NSURLSession.sharedSession() session.dataTaskWithRequest(request, completionHandler: {(data: NSData!, response: NSURLResponse!, error:...
android,google-maps,google-places-api
It looks like the main issue is that you're running with an older version of Google Play Services. So in order for it to work for you, you will need to update the version of Google Play Services that is installed on your device or emulator. This also suggests that...
android,google-maps,mapactivity
Your activity creates the layout, but you need some additional code to actually start the map: In MapsActivity.java: @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); MapFragment mapFragment = (MapFragment) getFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); } Also, your activity should implement OnMapReadyCallback for more map logic. See the documentation at https://developers.google.com/maps/documentation/android/...
android,google-maps,android-layout,android-fragments,layout
So this is how I ended up fixing my little predicament: I set a theme for the dialog, specifically mapDialogFragment.setStyle(DialogFragment.STYLE_NORMAL, android.R.style.Theme_Light_Panel); And added some top and bottom padding in the layout. The result: Big up to saurabh1489 for helping me find the answer!...
android,google-maps,google-maps-markers
You should call mMap.clear(); in this method, so when you call this it will clear the map and then reassigned the markers. private void setUpMapIfNeeded() { if (mMap == null) { mMap = ((SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map)).getMap(); mMap.clear(); mMap.setOnMapClickListener(MyLocationActivity.this); if (mMap != null) { mMap.setOnMapClickListener(MyLocationActivity.this); mMap.setMyLocationEnabled(true); mMap.setBuildingsEnabled(true); mMap.setIndoorEnabled(true); mMap.setMapType(mMap.MAP_TYPE_NORMAL);...
You are using strings, please try with floats: var userLng = parseFloat($('#lng').val()); var userLat = parseFloat($('#lat').val()); var mapOptions = { center: { lat: userLat, lng: userLng }, zoom: 8 }; ...
javascript,ruby-on-rails,ajax,google-maps
Well, there are several ways on doing that. you can set a promise, or a listener to your AJAX, but the simplest way to do that is just call initialize() at the end of your AJAX code. Since google.maps.event.addDomListener(window, 'load', initialize); basically has the same effect with <body onload="initialize()">, or...
javascript,php,html,web-services,google-maps
You're probably looking to implement AJAX. What you would do is separate the PHP code from your Javascript, and make a page that simply outputs the coordinates. You then call this page from your Javascript, and you'll get the result in a variable. The easiest (but not best as you'll...
java,google-maps,geolocation,geocoding
Seems to have moved to a different location: The Google Geocoding API
android,api,google-maps,google-maps-api-3,reverse-geocoding
Make sure you have latest Google play library in your project. I am using this code and working for me. private class ReverseGeocodingTask extends AsyncTask<LatLng, Void, String> { Context mContext; public ReverseGeocodingTask(Context context) { super(); mContext = context; } // Finding address using reverse geocoding @Override protected String doInBackground(LatLng... params)...
The viewport bounds parameter only biases the results. It's not a hard limit. You can read about viewport biasing in the API documentation. However, the viewport returned by Google for a query for "London" does represent a bounding box you can use in your SQL query. You could also use...
javascript,google-maps,infowindow,geocode,google-geocoding-api
Like this: https://jsfiddle.net/jvxppeap/2/ The trick is: make an array that holds the marker objects. Then, inside addListener(marker, 'click' ... you check which of the markers has been clicked upon; look at "indexOf" in my code. With that index, you can read the right item of someArray, and you can add...
java,android,google-maps,android-fragments,tabs
The FragmentPagerAdapter will always load both of your fragments simultaneously (since the user could swype to the next tab in any moment), and you cannot make the number of preloaded Fragments less then 2 (one for each side). If you want you can just initialize the map after the user...
ios,google-maps,maps,markers,gmsmapview
I found the solution using the property groundAnchor of GMSMarker: _mapMarker.groundAnchor = CGPointMake(0.5,0.5); ...
javascript,json,google-maps,google-visualization
You should change your row data.addColumn('String', 'sitecode'); to data.addColumn('string', 'sitecode'); (non capital "s" in "string"), of course this applies to all of your added columns. Javascript is case-sensitive....
wordpress,google-maps,google-maps-api-3,acf
You can create a custom query and loop through all locations. var locations = [ <?php $args = array( 'post_type' => 'your_post_type', 'posts_per_page' => -1 ); $locations = new WP_Query($args); if($locations->have_posts()){ while($locations->have_posts()){ the_post(); $loc = get_field('location') ?> ['<?php echo get_the_title(); ?>', <?php echo $loc[0]; ?>, <?php echo $loc[1]; ?>], <?php...
javascript,google-maps,events,infowindow
Two issues: There is a typo in your click listener code, javascript is case sensitive, infowindow and infoWindow are different objects, so you are not setting the position of the infowindow correctly. infowindow.open(map); infoWindow.setPosition(event.latLng); You are currently placing the infowindow at the place that is clicked infoWindow.setPosition(event.latLng);. If you want...
android,google-maps,android-maps
I think Google Maps just doesn't know that you can walk over. a workaround would be to draw a simple polyline between the two points if they are close to each other, and if they are both open ground....
javascript,css,google-maps,google-maps-api-3
Set the pixelOffset of the InfoWindow appropriately: From the documentation on InfoWindows pixelOffset | Type:Size | The offset, in pixels, of the tip of the info window from the point on the map at whose geographical coordinates the info window is anchored. If an InfoWindow is opened with an anchor,...
Currently, your do.call creates a matrix (using rbind and c), coercing all the numeric into characters. The following should turn your list "json" into the data.frame "geocode" will the information you need, i.e. "address", "long" and "lat". foo <- function(x) data.frame(address=paste(x$street_address, x$locality, x$region), long=x$longitude,lat=x$latitude) geocode <- do.call(rbind, sapply(json, foo)) ...
You are just saving a map into variable and not displaying it. Just do library(ggmap) map <- qmap('Anaheim', zoom = 10, maptype = 'roadmap') map Or library(ggmap) qmap('Anaheim', zoom = 10, maptype = 'roadmap') ...
You can add the ID of each Marker that you explicitly add to your map in a Set<String> in order to differentiate them from the other Markers on your map. Documentation: https://developers.google.com/android/reference/com/google/android/gms/maps/model/Marker#getId() //instance variables: LatLng latLng; String title; String snippet; Set<String> markerIDs = new HashSet<String>(); When adding a Marker in...
javascript,html,sql,google-maps,maps
If you don't want to do anything on the server to provide a unique url, you can use a client side hash with urls in the form /mymap#uniqueId. The hashed part of the url is accessible in javascript like so: window.location.hash You can even set that property on the location...
This should get you headed in the right direction, but be sure to check out the examples pointed out by @Jaap in the comments. library(ggmap) map <- get_map(location = "Mumbai", zoom = 12) df <- data.frame(location = c("Airoli", "Andheri East", "Andheri West", "Arya Nagar", "Asalfa", "Bandra East", "Bandra West"), values...
Because of it's scope, your codeAddress javascript function is not visible for outer caller myLoop, as it is enclosed within myFunction, therefore you get the codeAddress is not defined. Try to rewrite your code similar to this (I have not tested, so it might not work right away, but you...
The call to request location updates does just that, it requests location updates. After you make that call, new locations will come in to onLocationChanged() If you want to always have the current location saved, you can do so with member variables. Note that there is no need to log...
javascript,angularjs,google-maps,google-maps-api-3,ionic
This should do the trick. Javascript var options = { timeout: 10000, enablehighAccuracy: false }; $cordovaGeolocation.getCurrentPosition(options) .then(function(position) { var myLat = position.coords.latitude; var myLong = position.coords.longitude; console.log(myLat, myLong); var center = new google.maps.LatLng(myLat, myLong); var mapOptions = { center: center, zoom: 16, mapTypeId: google.maps.MapTypeId.ROADMAP, streetViewControl: false, mapTypeControl: false, zoomControl: false...
javascript,jquery,google-maps,google-maps-api-3
Set the center of the map once it has a size. Call .show, trigger resize, then center the map (otherwise it centers in a zero size map in the upper left hand corner of your div...) function showMap() { $("#mymap").show(); google.maps.event.trigger(map, 'resize'); map.fitBounds(bounds); } working fiddle code snippet: function hideMap()...
Try this it is working for me var mapCenter = map.getCenter(); var location = new google.maps.LatLng(mapCenter .lat(), mapCenter .lng()); ...
javascript,google-maps,google-maps-api-3,kml,parcel
geoxml3 parses the KML to native google.maps.Polygon objects. You can process those polygons in the afterParse function: var myParser = new geoXML3.parser({ map: map, afterParse: useTheData }); var kml = myParser.parse('kml/SO_20150619a.kml'); function useTheData(doc) { for (var i=0; i < doc[0].gpolygons.length; i++) { var centroid = new google.maps.Marker({map:map,position: get_polygon_centroid(doc[0].gpolygons[i].getPath().getArray())}); } }...
javascript,angularjs,google-maps,google-maps-api-3
I have created the fiddle. Here is the HTML. <div ng-app="main" ng-controller="mainCtrl"> <ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true" events="map.events"> <ui-gmap-marker ng-repeat="m in map.markers" coords="m.coords" icon="m.icon" idkey="m.id"></ui-gmap-marker> </ui-gmap-google-map> </div> The controller is like this. angular.module('main', ['uiGmapgoogle-maps']) .controller('mainCtrl', function ($scope) { angular.extend($scope, { map: { center: { latitude:...
You can use <c:forEach> for that. <m:polygon lineWidth="4"> <c:forEach items="#{bean.points}" var="point"> <m:point latitude="#{point.latitude}" longitude="#{point.longitude}" /> </c:forEach> </m:polygon> The <ui:repeat> is unsuitable as it doesn't build the component tree. A theoretical alternative would be to use a fictive <m:points> component from the GMaps4JSF, if it has one. See also: JSTL in...
I have manipulated your data a a bit to be more generic. You have to declare map and ctalayers as global objects, load the new KML URL and render it to the map as: ctaLayer = new google.maps.KmlLayer({ url: kmlURL}); ctaLayer.setMap(map); Full demo: http://jsfiddle.net/Rsp22/2209/...
Basically, you can not. But you can use a SQLite cordova plugin if you are developing a hybrid mobile application. http://ngcordova.com/docs/plugins/sqlite/ is one of the best SQLite plugins for cordovajs....
android,google-maps,android-maps-v2
Your error says that Caused by: java.lang.RuntimeException: API key not found. Check that <meta-data android:name="com.google.android.geo.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml I think you should add API Key for your project. You must add debug api key. First create xml file on values directory. Name it...
javascript,arrays,google-maps,google-maps-api-3
You need to modify a little bit your code, this should do the trick: for (var i = 0; i < stories.length; i++) { var storydata = stories[i]; var iconString = ''; switch (storydata.type) { case 'Agrifood': iconString = 'http://maps.google.com/mapfiles/ms/icons/green-dot.png'; break; case 'Biotechnology': iconString = 'http://maps.google.com/mapfiles/ms/icons/pink-dot.png'; break; case 'BuiltEnvironment': iconString...
The WPF form has a loaded event, you can add some code there to load your first map: Private Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded ShowMapButton_Click(sender, e) End Sub In this case I hardcoded an address into the AddressTxtBox and called Show Map. You can add whatever...
javascript,jquery,google-maps,google-maps-api-3
You must also register the custom mapType for the map. Place this line after the line where you create the google.map.Map-instance: gmap.mapTypes.set('Styled', styledMapType); However, when you only want the map to appear in a single style you don't need to create a custom mapType, you may apply the styles directly...
The main issue you mention: the marker fails to show up at the given location It looks like the main reason is that the getLastKnownLocation() is returning null, so it never gets into your code which sets the Marker at the current position. Instead of calling that method, you can...
To get the infowindows to close when you click on another layer, set suppressInfowindows:true, then add a click listener to each layer that calls your openInfoWindow function. Declare a single global InfoWindow for all the layers to use. for (var i = 0; i < layers.length; i++) { layers[i].setMap(null); google.maps.event.addListener(layers[i],...
javascript,google-maps,google-maps-api-3
If you don't want the HYBRID map type available, remove it from the types available. https://developers.google.com/maps/documentation/javascript/maptypes The following map types are available in the Google Maps API: MapTypeId.ROADMAP displays the default road map view. This is the default map type. MapTypeId.SATELLITE displays Google Earth satellite images MapTypeId.HYBRID displays a mixture...
Intent i6 = new Intent(this, mapsFragment.class); startActivity(i6); mapsFragment is a Fragment. It is not an Activity. You cannot call startActivity() with an Intent that points to a Fragment....
objective-c,uitableview,google-maps,ios8,core-location
Figured out the issue. Turned out that I never stopped the locationManager from updating the current user location so the didUpdateLocations delegate method was being called continuously and consuming resources. Once I sent the stopUpdatingLocation method to the location manager it fixed the problem
javascript,jquery,google-maps,google-maps-api-3
if you try this google maps event demo site on your phone/tablet, you would realize nothing happen even when you do a long click. It just means Google Maps support no tablet events. But with jQuery, you can detect a long click, or other "mobile only" events. However, jQuery has...
javascript,google-maps,firefox,google-maps-api-3
innerText is not supported in Firefox. references: 'innerText' works in IE, but not in Firefox W3C DOM Compatibility - HTML ...
javascript,google-maps,google-maps-api-3,infowindow,raty
Instead of using a string use a node to create the content(to be able to easily access the content via jQuery) store the rating as a attribute of the particular node(to be able to use a single function to create the stars) simple demo: function initialize() { var mapOptions...
android,google-maps,xamarin,monodroid
If you're using the Xamarin Android Player, the GPS coordinates are simulated. You need to update the location you want. To do this click on Settings then the GPS tab. Your app will see the new coordinates and should return the correct address. ...
javascript,jquery,google-maps,google-maps-api-3
Solved this by replacing (for example): this.styleIcon.set('zIndex', google.maps.Marker.MAX_ZINDEX + 1); with this.set('zIndex', google.maps.Marker.MAX_ZINDEX + 1); ...
python,google-maps,url,polyline,http-status-code-400
The maximum length of a URL is 2,083 characters, the posted URL is at least 2154 characters sources: https://www.google.com/search?q=maximum+length+of+URL [SO] What is the maximum length of a URL in different browsers? ...
java,android,google-maps,location,latitude-longitude
you can simple use distanceTo(Location location) from Location class todo this, like: Location makerLoc = new Location("marker"); markerLoc.setLatitude(markerPosition.latitude); markerLoc.setLongitude(markerPosition.longtitude); float meters = myLocation.distanceTo(markerLoc); ...
Citing form Geolocation API spec: interface Geolocation { void getCurrentPosition(PositionCallback successCallback, optional PositionErrorCallback errorCallback, optional PositionOptions options) [...] } [...] The enableHighAccuracy attribute provides a hint that the application would like to receive the best possible results. This means you can pass this in an object as the last parameter...
javascript,arrays,google-maps,google-maps-api-3
You can't hide a marker based on the elements in your array. They don't have .setMap methods. The markers need to be google.maps.Marker objects. When you create the markers, keep references to them in another array (say "gmarkers"), then use that to hide/show them. proof of concept fiddle (using your...
android,google-maps,google-maps-markers,infowindow
Here is a simplified and slightly modified solution based on this answer. Note that the linked answer implements an InfoWindow for both Markers and Clusters. This solution only implements InfoWindows for Markers. It's similar to how you would implement a custom InfoWindowAdapter for normal Markers with no Clustering, but with...
In order for this URL Scheme to work you need to have the Google Maps app installed. If you want to use the callback option, you need your app to respond to some URL Scheme. In order to do so, please check this link. After that, pass your custom...
android,google-maps,android-maps-v2
You are attempting to find a fragment before it exists. You indicate that the layout that has the fragment is fragment_example_map.xml. However, you are trying to find the map fragment before you inflate that layout file. This will not work. Beyond that, you appear to be trying to get at...
javascript,html5,google-maps,gps,geolocation
setInterval(function, delay) or (function(){ // do some stuff setTimeout(arguments.callee, 60000); })(); The second aproach guarantees, that the next call is not made before your code was executed. The final code will depends on the choosen aproach. could be var map; var geocoder; var delay = 1000; function initialize() { var...
javascript,google-maps,google-maps-api-3,webbrowser-control
about:blank is not a URL, it is in some sense the absence or a URL. In fact, loading the API from about:blank does not send a referer header, and window.location in about:blank is empty. What this means is that you cannot restrict your client id to a specific URL whitelist...
jquery,google-maps,google-maps-api-3,autocomplete
I think that you're getting the null pointer when it is attempting to assign the country. Try adding in field for the country, such as <div class="form-group"> <label class="control-label">Country</label> <input type="text" name="country" id="country" value="" placeholder="" class="form-control" maxlength="15"/> </div> When I added that to the JSFiddle you submitted, it worked correctly....
javascript,css,html5,google-maps,google-maps-markers
Please note as per the stacking order of the CSS -first the context is printed -then the element with position and negative z-index are printed -then element without position are printed -after that the element with 0 or auto z-index are printed -the all element with postive z-index and position...
Change this: var map = new google.maps.Map(element, mapOptions); To this: var map = new google.maps.Map(element[0], mapOptions); ...
Your example contains the error, in particular at line where request object is initialized, waypoints array could not be initialized that way. One option would be to place the waypoints array initialization outside of request object initialization as demonstrated below. Fixed example var directionsDisplay; var directionsService = new google.maps.DirectionsService(); var...
javascript,jquery,mongodb,google-maps,google-maps-api-3
You can first set the visibility of the div which contains map to hidden; then listen to the first tilesloaded event, and set the visibility back to visible. Doing this the Maps should only pop up after all it tiles is loaded (so no gray screen) Here is a quick...
Your code works for me, just fixed some } and ]. http://jsfiddle.net/3qo8kg2o/ But I think you should use polyline instead....