maps

Cannot see the blue dot and circle at Mylocation Maps

偶尔善良 提交于 2019-12-09 03:58:53
问题 I want google maps to show the location of the user centered at the map as at the image 1 And this is my Fragment Code: public class MapFragment extends Fragment implements OnMapReadyCallback { GoogleMap googleMap; MapView mapView; View myview; public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { myview = inflater.inflate(R.layout.map_layout, container, false); mapView = (MapView) myview.findViewById(R.id.map); mapView.onCreate(savedInstanceState

proper implementation of invalidateSize() to display mapbox/leaflet on mobile device

心不动则不痛 提交于 2019-12-09 03:38:28
I started a question about a bootstrap leaflet map not displaying on mobile devices How can I fix bootstrap leaflet map mobile display? Since then I have used a simple mapbox template for a map and with invalidateSize() as outlined here https://www.mapbox.com/help/why-map-cropped-hidden-shown/ But still no luck getting the map to display on a mobile phone. Can anyone assist me with the proper implementation of invalidateSize()? Thanks Barry There is a single div element: <div id='map' class='blue'></div> and this is the script: <script> L.mapbox.accessToken = 'mytoken'; var map = L.map('map')

SELECT From MySQL View With HAVING Clause Returns Empty Result Set

安稳与你 提交于 2019-12-09 03:38:03
问题 My business partner and I are having issues selecting from a MySQL view that has a HAVING clause. The query simply selects a few fields from the view, determines a distance dynamically with a few calculations, and aliases it as 'distance' - then limits the results to those rows with a distance less than a supplied variable. The distance is calculated using the Haversine formula, referenced by Google Maps: https://developers.google.com/maps/articles/phpsqlsearch Here is what I know: 1) When

Calculating MAX and MIN Latitude and Longitude with distance from Location - Objective C

前提是你 提交于 2019-12-09 03:16:51
问题 I need to compute MAX and MIN Latitude and Longitude values from a location with certain distance. I have thousands of locations stored in CoreData, and I want to show only the ones within 5km from users location. How can I approach this problem? 回答1: Here's a possible solution: macros to convert Degrees to Radians #define deg2rad(degrees) ((degrees) / 180.0 M_PI) macros to hold my searching distance #define searchDistance 5.00 //float value in KM set the minimum and maximum Latitude,

How to replicate marker position on map loop Leaflet JS

孤人 提交于 2019-12-09 00:50:25
问题 I'm using Leaflet JS to build a custom map (with custom tiles), it loops East to West. I've added a couple layers of markers and polygons (to indicate a route in the map) and each marker has pop up date within it. I want to duplicate the marker/polygon layers in the seemingly same position on the cloned map loops left and right of the original layer. var mapMinZoom = 2; var mapMaxZoom = 6; var tiles = L.tileLayer('../bigger_map/{z}/{x}/{y}.png', { unloadInvisibleTiles : false, reuseTiles :

Conversion of lat/lng coordinates to pixels on a given map (with JavaScript)

江枫思渺然 提交于 2019-12-08 23:00:14
问题 I have put together a cities database from MaxMind and it includes the lat/lng values for each city in the database. I have also put together a map of North/America and I would like to have a icon appear on the x/y coordinates of the map which are derived from the lat/lng coordinates of the city database record. From my understanding I need to find the left/top bounds of the map first (lat/lng -> x/y) and then use that as a difference for the linear relationship between any of the north

draw polyline on walked route google maps android

只谈情不闲聊 提交于 2019-12-08 21:40:31
i'm kind of new to android and i'm developing an app where the user walks and i want to draw a polyline while the user is walking here's what i have done so far MapClass package com.T471.stayfit; import android.content.Context; import android.location.Criteria; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.widget.Toast; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.GooglePlayServicesClient;

Increase in app size after use of Google Maps SDK for iOS

女生的网名这么多〃 提交于 2019-12-08 20:06:45
问题 I tried using the Google Maps SDK for iOS and it seems to add a considerable amount of size (96MB) to our app, which is currently only at 26MB (using the Apple maps). I would apprecaiate any feedback/experience on how to resolve. 回答1: There isn't a way to resolve this. Its one of the cons of working with Google Maps SDK vs Apple maps. Google Maps SDK is its own static framework that isn't preloaded on the device. Apple Maps are build into the OS as a dynamic framework. Another Possibility:

getLastKnownLocation() always returning null, all providers are DummyLocationProvider

会有一股神秘感。 提交于 2019-12-08 18:34:26
I have seen many posts regarding this problem, but none of them offered a solution for me. I am trying to get the user position through the GPS (or, ultimately, any other valid provider). But I am always getting null locations. I do get a map, and can set an arbitrary location, is the providers that don't work. I have my MAPS key properly set (also checked that it was the right one), all necessary permissions set ( android.permission.INTERNET , android.permission.ACCESS_COARSE_LOCATION , android.permission.ACCESS_FINE_LOCATION ) and in fact, all seemed to be working just fine yesterday! I

Is it possible with kml and google maps

旧街凉风 提交于 2019-12-08 13:11:35
I want to know if this is possible with google maps. I create a 2 small grids on google maps with kml file. How can I find out using php of if my address is listed in grid 1 or 2. Need help please. I wrote code for doing exactly this, but rather than grids, for areas of the UK. I had to read the KML file like XML using DOMDocument::load() , this enables you to read the KML file and get the longitude and latitude points it contains. Bear in mind though that I had to change the KML slightly for this to work. Firstly after building your custom map in Google Maps right click and copy the Google