geocode

Why my geocode cannot show the address

此生再无相见时 提交于 2020-01-15 11:18:11
问题 var geocoder, map, point, fmtAdd, marker; function mapLoad() { geocoder = new google.maps.Geocoder(); var myOptions = { zoom: 15, mapTypeControl: false, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new google.maps.Map(document.getElementById("map"), myOptions); address="W3 6BY"; if(address){geocoder.geocode({'address':address}, geocodeResult);} else{alert("Postcode Incorrect");window.close();} } function geocodeResult(results, status) { if (status == 'OK' && results.length > 0) { point

How do I convert city names to time zones?

六眼飞鱼酱① 提交于 2020-01-05 07:07:08
问题 Sorry if this is repetitive, but I've looked everywhere and can't seem to find anything that addresses my specific problem in R. I have a column with city names: cities <-data.frame(c("Sydney", "Dusseldorf", "LidCombe", "Portland")) colnames(cities)[1]<-"CityName" Ideally I'd like to attach a column with either the lat/long for each city or the time zone. I have tried using the "ggmap" package in R, but my request exceeds the maximum number of requests they allow per day. I found the

Code to Get GPS Coordinates from Address (VB/VB.Net/VBA/VBScript)

旧城冷巷雨未停 提交于 2019-12-28 18:50:24
问题 I believe the Google API allows you to get coordinates for a given address. However, most (or should I say all) of the examples I've found aren't for vb. Usually it's some javascript example that just leaves me confused. Here's some code I have that uses a geocoding service. This works great. It's just that I want to query Google Maps directly myself. Public Function fgGetLatAndLongUsingAddress(sAddress As String) As String 'This function works best with a complete address including the zip

inconsistent result with INVALID_REQUEST in R ggmap geocode()

你离开我真会死。 提交于 2019-12-24 16:33:42
问题 I'm trying to geocode a list of addresses, and I'm getting some INVALID_REQUEST errors, but I have no idea why. Check this out: # First check if I have permission: geocodeQueryCheck() 2478 geocoding queries remaining. # Enter data d <- c("Via del Tritone 123, 00187 Rome, Italy", "Via dei Capocci 4/5, 00184 Rome, Italy") # Ensure it's a character vector class(d) [1] "character" # Try to geocode library(ggmap) geocode(d) lon lat 1 NA NA 2 12.49324 41.89582 Warning message: geocode failed with

Python Pandas 'apply' returns series; can't convert to dataframe

喜夏-厌秋 提交于 2019-12-23 09:46:28
问题 OK, I'm at half-wit's end. I'm geocoding a dataframe with geopy. I've written a simple function to take an input - country name - and return the latitude and longitude. I use apply to run the function and it returns a Pandas series object. I can't seem to convert it to a dataframe. I'm sure I'm missing something obvious, but I'm new to python and still RTFMing. BTW, the geocoder function works great. # Import libraries import os import pandas as pd import numpy as np from geopy.geocoders

Bing GeocodeService userState usage as custom additional parameter

守給你的承諾、 提交于 2019-12-23 05:55:07
问题 In my Windows Phone 7.1 application I have to send a request that consumes Bing geocoding services (using the address: http://dev.virtualearth.net/webservices/v1/geocodeservice/geocodeservice.svc/mex, without setting the option Always generate message contracts in my Service Reference Settings). My request is made in this way: BingMapGeoCodeService.GeocodeRequest request = new BingMapGeoCodeService.GeocodeRequest(); request.Options = new BingMapGeoCodeService.GeocodeOptions() { Filters = new

Closes matching address (Google maps) APEX procedure

狂风中的少年 提交于 2019-12-23 05:14:32
问题 I have problem with displaying address in text field in one of the apex pages region. Currently I have longitude and latitude text fields, which read their values from draggable marker from the google map. (When you drag the marker, the program automatically retrieve geocode and it assigns it directly to appropriate text fields, it works perfectly fine). Now I want to do the same for address, when I drag the marker into any position I want to receive the closes matching address, which will go

Geocoding API's response was not valid JSON. and request.location = nil

两盒软妹~` 提交于 2019-12-22 04:39:19
问题 if Rails.env.development? @current_location_geo = Geocoder.search(request.remote_ip).first else @current_location_geo = request.location end if !@current_location_geo.nil? && @current_location_geo.ip == "127.0.0.1" @departure_currency_code= "AUD" @departure_currency_name= ["Australian Dollar(AUD $)","AUD"] else @country = Country.new(request.location.data["country_code"].to_s) @country_code = @country.currency.code end end i am getting request.location nil . i tried to add timeout in

Stub out address geocoding during RSpec unit test

有些话、适合烂在心里 提交于 2019-12-22 03:55:28
问题 I'm using the geocoder gem to add geocoding functionality to one of my Active Record model classes. This works great, but I don't actually want the geocoding to fire during unit tests. I've tried stubbing out the call to geocode by adding this to my RSpec test: before(:each) do User.stub!(:geocode).and_return([1,1]) end However, when I run my tests it still appears to be calling out to geocode. What am I doing wrong? FYI, this all works if I stub on the instance level (e.g. some_user.stub!

placing multiple markers on google map from array

荒凉一梦 提交于 2019-12-21 05:11:11
问题 I'm trying to place multiple markers on a map that are provided from an array. Right now only my initial point loads (NYC). var geocoder; var map; var markersArray = []; //plot initial point using geocode instead of coordinates (works just fine) function initialize() { geocoder = new google.maps.Geocoder(); latlang = geocoder.geocode( { 'address': 'New York City'}, function(results, status) { //use latlang to enter city instead of coordinates if (status == google.maps.GeocoderStatus.OK) { map