maps

Google Maps openInfoWindowHTML array problem

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Could someone please help explain why I can't get this to work? I properly generates all the locations, however, it doesn't generate the info boxes. Why is this and can someone help me with it? var map = new GMap2(document.getElementById("map")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(47.6062, -122.3321), 8); var wa_locations = new Array(new Array("Seattle", "47.6062", "-122.3321", "###-###-####", "###-###-####"), new Array("Bellevue", "47.6104", "-122.2007", "###-###-####", "

Google Maps API - Overlay Custom Roads

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I am having a few issues with the Google Maps API. I managed to make a cutom map using an image tile. which seems to be working OK. I am just wondering if there is a way to overlay roads on the map? At the moment I am assuming there are 2 ways this is possible, either some built in function in the API, which I am having troubles finding. I have found paths etc, But I would like roads/streets to have labels, resize on zoom etc, as well as be able to toggle. The other option was to do a second image tile and overlay that image, which

Google maps-api v3 InfoWindow automatically open on page load

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am working on a project where I am using the Google Maps api-v3 , On the map there will be a few place markers containing information that I am storing in an InfoWindow. I am wondering is there anyway that you can set an InfoWindow to automatically open on the page load (i.e automatically open without user interaction). Searching online all I can seem to find is that it needs to be tied to an event listener but all the events the InfoWindow object seems to have are mouse events. Does anyone know of a workaround of sorts ? 回答1: Not sure I

'Failed to find style mapViewStyle' error persists

匿名 (未验证) 提交于 2019-12-03 10:10:24
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been working on this app for almost a year now (senior project) when it just decided to break a few days ago. My application has been developed using Eclipse version 3.7.2 64bit targeting Froyo Android 2.2, using my Windows 7 64bit pc. So far I have tried: rearranging the uses-library tag in the manifest file rewriting the map xml file deleting the R.java file and refreshing placing the mapview element within a layout reinstalling eclipse and the android-sdk cleaning the project creating a style.xml file and referencing it deploying on

Android Google Maps V2 Caused by: java.lang.ClassCastException: com.google.android.gms.maps.SupportMapFragment cannot be cast to android.app.Fragment

匿名 (未验证) 提交于 2019-12-03 09:52:54
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have this in my class import android.os.Bundle; import android.support.v4.app.FragmentActivity; import com.coffeeandcookies.ushuaiamovil.R; public class LayMapa2 extends FragmentActivity { @Override protected void onCreate(Bundle arg0) { setContentView(R.layout.lay_mapa2); super.onCreate(arg0); } } This in my xml <?xml version="1.0" encoding="utf-8"?> <fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" android:name="com.google

Android itemizedOverlay's onTap action overrided

烈酒焚心 提交于 2019-12-03 09:48:50
I have a class : class MapItemizedOverlay extends com.google.android.maps.ItemizedOverlay<OverlayItem> { private Context context; private ArrayList items = new ArrayList(); public MapItemizedOverlay(Context aContext, Drawable marker) { super(boundCenterBottom(marker)); context = aContext; } public void addOverlayItem(OverlayItem item) { items.add(item); populate(); } @Override protected OverlayItem createItem(int i) { return (OverlayItem) items.get(i); } @Override public int size() { return items.size(); } @Override protected boolean onTap(int index) { OverlayItem item = (OverlayItem) items

Leaflet polygon with fuzzy outline

旧时模样 提交于 2019-12-03 09:42:58
I am looking for a way to have a fuzzy/blur/gradient outline of a leaflet polygon. This should help make country outlines more simple (currently, when you zoom in to a svg representing a country, it gets ugly/inaccurate). I was thinking about attaching CSS attributes to the svg similiar to this: http://www.w3schools.com/svg/svg_fegaussianblur.asp But apparently the svg subelement <g> (used for the leaflet polygon) does not accept this. I also had a look at <defs> of svg (see here: http://geoexamples.blogspot.be/2014/01/d3-map-styling-tutorial-ii-giving-style.html ) but have no clue in applying

Raster map with discrete color scale for negative and positive values R

帅比萌擦擦* 提交于 2019-12-03 09:31:42
I have two dataframes which I will like to map. The dfs have the same xy coordinates and I need a single colorbar with a visible discrete color scale for both dfs like the one shown here. I would like the colors in the colorkey to match the self-defined breaks. a more general solution that can be applied outside this example is much appreciated The RdYIBu color palette from the RcolorBrewer package is what I am after. My code so far: library(rasterVis) ras1 <- raster(nrow=10,ncol=10) set.seed(1) ras1[] <- rchisq(df=10,n=10*10) ras2=ras1*(-1)/2 s <- stack(ras1,ras2) Uniques <- cellStats(s,stat

IPhone : google maps directions

断了今生、忘了曾经 提交于 2019-12-03 09:22:10
i'm developing an iPhone app which embed a mapView made with mkmapkit. I got two coordinates and I'm tracing the direction between these two points. Everything works well. I'm using google maps api : maps.googleapis.com/maps/api/directions to retrieve xml with all the steps of the direction. But one thing is very strange : I just can't understand why driving direction is not accurate. Between two steps it trace a right line and don't follow the road while walking travel mode trace a very accurate direction, following roads. Driving Mode : http://www.michael-blin.fr/misc/aden/google/driving.png

Android Google Maps v2 - Keep marker in the center of map

匿名 (未验证) 提交于 2019-12-03 09:21:58
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm a new Android developer working with Google Maps v2 right now. I just need to let the user drag the map but the initial marker shouldn't move with it. This is my layout : <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="wrap_content" android:layout_height="wrap_content" > <fragment android:id="@+id/map" android:name="com.google.android.gms.maps.MapFragment" android:layout_width="match_parent" android:layout_height="match_parent" />