google-maps-api-3

Multiple Google Maps won't display on single page

我的梦境 提交于 2019-12-25 02:08:13
问题 I have read many different posts about getting multiple Google maps to display on a single page, but none seem to related to my code, which uses the Google Maps API V3. I have 2 Google Maps on the same page, but in different tabs. I have duplicated the code for Map1 and pasted it into a 2nd tab to create Map2. I have then changed the "var map" and "map_canvas" id's for Map2, but when published, only Map2 displays on the page. I tried the option of deleting the lines; <meta name="viewport"

Multiple Map Markers with Infoboxes from parsed XML

混江龙づ霸主 提交于 2019-12-25 02:08:01
问题 I know I'm fairly close to solving this, I just need a little push in the right direction. I'm generating XML from a database that has marker locations and some other data that should be displayed in an infobox on click. I generate the XML properly and plot the markers correctly. My problem lies with the infobox. My infoboxes display the data for the last marker that was placed. I've created an array that stores one piece of data(NAME), but the infobox still only shows the info from the last

scope of markers variable for google maps (gmaps4rails gem)

偶尔善良 提交于 2019-12-25 01:24:51
问题 I'm trying to understand javascript, and the way variables are passed around, but I'm not doing too well. I'm trying to refresh a google map's markers with ajax, but nothing is happening. I submit a form, which sends some variables to the controller. Some stuff is processed, and it responds with .js to... find.js.erb $('#collapseTwo ul').html("<%= j render partial: 'events/sidebar', collection: @events %>"); alert(<%= raw @hash.to_json %>); clearMarkers(); markers = handler.addMarkers(<%= raw

how to raise a marker limit in Google Maps?

↘锁芯ラ 提交于 2019-12-25 01:09:47
问题 I've been searching about this for few days, but I think I only understand less than a half. I'm creating a AutoIT application using Google Maps API V3 and free API key. When I add 1500 markers within 30 mins with 500~600ms delay each marker, my map won't be displayed anymore. It is just blank. I can't see the error message, but I think it's "OVER QUERY LIMIT" . Usually it will become normal after few hours or on the next day. The map is normal if I run it from another site (different IP

JavaScript UI for ideally Bing maps or Google maps?

十年热恋 提交于 2019-12-25 00:26:44
问题 Im making a simple proof of concept webpage using Bing maps. I need to have several pins on a map which is embedded in my page. Then a javascript UI will make it so when users tick or untick certain boxes the results are filtered, so different pins will be made visible or invisible. Sorry for the openness of this question but how do I go about doing this? Id much rather work with jQuery than plain JavaScript. Its only a proof of concept so speed, performance, reliability, etc are all flexible

How to do a city/state/country code lookup based on zip/country input by the user?

放肆的年华 提交于 2019-12-24 23:26:27
问题 Would there be a way to do a city/state/country code lookup based on zip/country input by the user? My site will be international, hence the reason for asking the user to input their country. I'm thinking the user inputs the zip/post-code and country, which gets saved to the database and then the Google geocode API will convert this to city, state and country and print the output to their user profile. For example: User input: Zip - 92646 Country - USA Output: Huntington Beach, CA, USA I

Set initial center and zoom in google maps API

北城余情 提交于 2019-12-24 23:03:04
问题 If we open google map directly, the initial view is the our city, the city is zoomed and fitted in the whole screen. If we create a map web app based on google maps API (without setting the center and zoom parameters), the initial view is blank. The question is: how to make the map web app behave the same as google map (eg. display initial map view as the user's city being fitted in the whole screen)? Looking forward to the answer, and expect as less code as possible. For Bing Maps API, the

rendering a json with direction service

浪子不回头ぞ 提交于 2019-12-24 22:40:29
问题 when i make a request for a specific latlang direction service responses with the same json. so instead of making the same requests always, i want to store the json somehow.i tried parsing the json and sent to my function which i render the responses, but it didn't work. is something like this even possible? var direction = JSON.parse('{"routes":[{"bounds":......}'); directionRenderer.setDirections(direction); 回答1: It's not possible by using directionRenderer.setDirections() , because not all

Using Google Maps api V3 with angular and browserify

核能气质少年 提交于 2019-12-24 22:36:24
问题 I am trying to use the Google Maps Javascript Api V3 inside a Angular + browserify app. I do not use bower. Previously I was doing that with requirejs, and a plugins on git hub millermedeiros/requirejs-plugins called async. I was able to load gmaps like this (most of the time, sometimes requirejs was still requireing gmaps too early. // load gmap as an amd module define(['config'], function(config){ define('gmaps', ['async!http://maps.google.com/maps/api/js?v=3&sensor=false&libraries=places

Batch requests for Google Places (Javascript v3)

大兔子大兔子 提交于 2019-12-24 22:32:09
问题 Is there a way to batch requests for the Places Library in JavaScript? I've seen this page, so I've gathered it's possible, at least, I'm just not sure how it'd work with Places API. I need to run a request for every place I find on google maps (this leads to a lot of OVER_QUERY_LIMIT exceptions). I've given thought to queuing the requests and running them a second apart, but if a user gets several hundred places queued up, a fair amount of results are going to go missing if the user closes