[Solved] How to make multiple rectangles not using hard-coding in google maps api? [closed]

The specific requirements / objectives are a little vague but based upon the comment that they (multiple rectangles) are to be next to one another! then some simple arithmetic using the LatLngBounds for the initial rectangle can be done to determine either the difference in east/west ( to effectively get the width of the rectangle … Read more

[Solved] Google Maps Api v2 Android Error

Because version 2 of the Google Maps Android API requires OpenGL ES version 2, you must add a element as a child of the manifest element in AndroidManifest.xml: <uses-feature android:glEsVersion=”0x00020000″ android:required=”true”/> This notifies external services of the requirement. In particular, it has the effect of preventing Google Play Store from displaying your app on devices … Read more

[Solved] How to add Google Maps Api in a project? [closed]

if you want to add a map without iframe, check out this jsfiddle http://jsfiddle.net/cQTdc/ <html> <head> <script type=”text/javascript” src=”http://code.jquery.com/ui/1.10.3/jquery-ui.js”></script> <script src=”https://maps.googleapis.com/maps/api/js?sensor=false”></script> <script> function initialize() { var map_canvas = document.getElementById(‘map_canvas’); var map_options = { center: new google.maps.LatLng(51.372658, 1.354386), zoom:16, mapTypeId: google.maps.MapTypeId.HYBRID } var map = new google.maps.Map(map_canvas, map_options) } google.maps.event.addDomListener(window, ‘load’, initialize); </script> <style> #map_canvas { … Read more

[Solved] Google Maps Javascript positioning control maps

One option (use the custom pan control from this question): function initialize() { var mapDiv = document.getElementById(‘map_canvas’); var map = new google.maps.Map(mapDiv, { center: new google.maps.LatLng(39.300299, 34.471664), zoom: 6, disableDefaultUI: true, mapTypeControl: true, //mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, position: google.maps.ControlPosition.RIGHT_TOP }, mapTypeControlOptions: { style: google.maps.MapTypeControlStyle.DROPDOWN_MENU, position: google.maps.ControlPosition.LEFT_TOP }, mapTypeId: google.maps.MapTypeId.TERRAIN, zoomControl: true, zoomControlOptions: { position: google.maps.ControlPosition.TOP_LEFT … Read more

[Solved] How set auto day/night mode google maps in Xamarin Forms

Install the Xamarin.Forms.GoogleMaps Nuget Package (source code available on GitHub) which has already implemented it on Xamarin.Forms. You can refer to the MapStylePage sample available here which basically explains you how to create original map styles using MapStyle With Google. You can use the wizard, select the Night theme from there and get the corresponding … Read more

[Solved] Google Maps Onclick panTo new location Too Much Recursion error [closed]

The argument to panTo needs to be a google.maps.LatLng object or a LatLngLiteral What you are giving it is neither (it is a comma separated string that happens to contain a latitude and a longitude: <li><a class=”location” data-location=”52.240477,-0.902656″>northampton</a></li> $(‘.location’).on(‘click’,function(){ pan($(this).data(‘location’)); }); function pan(latlon) { var panPoint = new google.maps.LatLng(latlon); map.panTo(panPoint) } working fiddle working code … Read more

[Solved] Retrieve info from google maps autocomplete

I get a javascript error with your code: Uncaught ReferenceError: results is not defined on this line: var town = extractFromAdress(results[0].address_components, “locality”); That should be the place object you retrieved (that you got the rest of the information from): var place = autocomplete.getPlace(); Then it works (if the result has a result of type “locality”) … Read more

[Solved] Center map on user’s location (Google Maps API v3)

Getting the user location is a browser feature that most modern browsers support. However, you still need to test for the ability to get the location in your code. if (navigator.geolocation) { // test for presence of location feature navigator.geolocation.getCurrentPosition(function(position) { initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); map.setCenter(initialLocation); }, function() { console.log(‘user denied request for position’); }); … Read more

[Solved] How can I share values between a Service and Fragment in Android? [duplicate]

You can use Bundle class and put_extra data to retrieve and put. Example : put_extra Intent i = new Intent(); i.putExtra(“name_of_extra”, myParcelableObject); to read data Bundle b = new Bundle(); b = getIntent().getExtras(); Object myParcelableObject = b.getString(“name_of_extra”); solved How can I share values between a Service and Fragment in Android? [duplicate]

[Solved] In google map using pinch to zoom in and zoom out with the current location as centre of the map

Create TouchableWrapper and use it in MapFragment public class TouchableWrapper extends FrameLayout { private GoogleMap mGoogleMap = null; public TouchableWrapper(Context context) { super(context); } public void setGoogleMap(GoogleMap googleMap) { mGoogleMap = googleMap; } @Override public boolean dispatchTouchEvent(MotionEvent event) { mScaleDetector.onTouchEvent(event); switch (event.getAction() & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_DOWN: mGoogleMap.getUiSettings().setScrollGesturesEnabled(true); long thisTime = System.currentTimeMillis(); if (thisTime – … Read more