google-maps

Check whether or not a point is in a polygon (Google Maps API)

旧时模样 提交于 2021-02-07 10:57:47
问题 So I have a map here How can I, using Google Maps API, detect whether or not a given coordinate is within that polygon? Is that possible? Thanks in advance. 回答1: Yes it is possible. See this function: http://github.com/tparkin/Google-Maps-Point-in-Polygon 回答2: Google provides one already var bermudaTriangle = new google.maps.Polygon({ paths: [ new google.maps.LatLng(25.774, -80.190), new google.maps.LatLng(18.466, -66.118), new google.maps.LatLng(32.321, -64.757) ] }); google.maps.event

how do i solve integrating google map in fragment in android

血红的双手。 提交于 2021-02-07 09:44:01
问题 I have a problem integrating google map in fragment in android. I know how to do it in activity but fragment reference on this site are very old and not working in 2018. I don't have any error.below is fragment file. Any help will be highly appreciated. I have added API key and proper manifest file. package com.example.narmail.truck30mint.Api.Fragments; import android.Manifest; import android.content.Context; import android.content.DialogInterface; import android.content.pm.PackageManager;

Access “My Maps” in Google Maps from Android

别等时光非礼了梦想. 提交于 2021-02-07 09:34:33
问题 I want to write an app to display markers from one of my custom maps in Google Maps. How do I access this data? There must be an API for it but I can't find information anywhere. 回答1: If you have created a Google My Maps map through the browser tools, you can just copy the link to your My Map and then pass it to the Google Map Application on the device. Intent intent = new Intent("android.intent.action.VIEW"); intent.setComponent(ComponentName.unflattenFromString("com.google.android.apps.maps

Access “My Maps” in Google Maps from Android

假装没事ソ 提交于 2021-02-07 09:34:00
问题 I want to write an app to display markers from one of my custom maps in Google Maps. How do I access this data? There must be an API for it but I can't find information anywhere. 回答1: If you have created a Google My Maps map through the browser tools, you can just copy the link to your My Map and then pass it to the Google Map Application on the device. Intent intent = new Intent("android.intent.action.VIEW"); intent.setComponent(ComponentName.unflattenFromString("com.google.android.apps.maps

how to find the markers in the individual clusters in a marker cluster object in google maps api v3?

浪子不回头ぞ 提交于 2021-02-07 08:31:53
问题 I followed the tutorial here to add an inforwindow to the individual clusters of markercluster at any zoom level. http://krisarnold.com/2010/10/15/adding-info-windows-to-map-clusters-with-google-maps-api-v3/ I want to add the info of the markers (e.g. their 'title' s to a list displayed in the info window when clicked on the markercluster object.) contained in respective cluster. So if I have 3 clusters at a particular zoom level in view, each having 5 markers insider it. How do I display a

Convert lat/lon to pixels and back

孤街醉人 提交于 2021-02-06 15:19:53
问题 I'm using google maps in my application, and I have a webserver with a databse filled with lat/lon values. I want to mark them on the map, but I also want to cluster them together if they are within a certain pixel-distance of eachother. I figure if I retrieve all my points from the database, I should be able to do something like this (pseudocode): clusters[]; while(count(points)) { cluster[]; point = points.pop(); boundingbox = pixelsToBB(point, pixeldistance, zoomlevel); query = "select *

Convert lat/lon to pixels and back

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-06 15:19:07
问题 I'm using google maps in my application, and I have a webserver with a databse filled with lat/lon values. I want to mark them on the map, but I also want to cluster them together if they are within a certain pixel-distance of eachother. I figure if I retrieve all my points from the database, I should be able to do something like this (pseudocode): clusters[]; while(count(points)) { cluster[]; point = points.pop(); boundingbox = pixelsToBB(point, pixeldistance, zoomlevel); query = "select *

Javascript OpenLayers before zoom event listener

╄→尐↘猪︶ㄣ 提交于 2021-02-06 11:23:52
问题 I am trying to set up OpenLayers to not display the vector layer just before a zoom starts and make it reappear after a zoom ends. I have the zoom ends part already established like this: map = new OpenLayers.Map('map_element', { eventListeners: { "zoomend": mapEvent}}); function mapEvent(event) { if(event.type == "zoomend") { hide_vector_layer(); } } But I don't see any kind of event listener for the start of a zoom in the documentation. There is a "movestart" which covers moving, panning,

Javascript OpenLayers before zoom event listener

隐身守侯 提交于 2021-02-06 11:22:45
问题 I am trying to set up OpenLayers to not display the vector layer just before a zoom starts and make it reappear after a zoom ends. I have the zoom ends part already established like this: map = new OpenLayers.Map('map_element', { eventListeners: { "zoomend": mapEvent}}); function mapEvent(event) { if(event.type == "zoomend") { hide_vector_layer(); } } But I don't see any kind of event listener for the start of a zoom in the documentation. There is a "movestart" which covers moving, panning,

Javascript OpenLayers before zoom event listener

对着背影说爱祢 提交于 2021-02-06 11:22:33
问题 I am trying to set up OpenLayers to not display the vector layer just before a zoom starts and make it reappear after a zoom ends. I have the zoom ends part already established like this: map = new OpenLayers.Map('map_element', { eventListeners: { "zoomend": mapEvent}}); function mapEvent(event) { if(event.type == "zoomend") { hide_vector_layer(); } } But I don't see any kind of event listener for the start of a zoom in the documentation. There is a "movestart" which covers moving, panning,