jquery-gmap3

Setting a max zoom level using jquery gmap3 & autoFit

三世轮回 提交于 2019-12-10 16:15:09
问题 I am using 'autoFit' on the gmap3 plugin so it zooms to the best level for the objects on the map. The problem is when there is only 1 object it zooms in to the maximum level which is too far. How can i make it go no futher than zoom level 14? Thanks. 回答1: You can use maxZoom, but that sets the max zoom of the map and not of the autofit function. That means that the user will not be able to zoom further in on the map if they would want to. map:{ center: true, zoom: 10, maxZoom: 18 } Instead I

Geo Coding Address - get district of a certain address (Google API)

≡放荡痞女 提交于 2019-12-09 17:33:05
问题 I have a database with exact addresses (street, no, city, region/area, country). However, I was wondering if there was a way to use Google API to get the district of a city (e.g. "Manhattan") if we are in New York? All the other information I have already in the database, so I would just need the district if there is one (of course this will be only in larger cities)... UPDATE: I found this function on http://www.techques.com/question/1-3151450/Google-geolocation-API---Use-longitude-and

JavaScript click event for any google maps markers?

会有一股神秘感。 提交于 2019-12-05 23:32:18
I need to make something happen when any google maps marker is clicked on. Im using the demo from this link as a starting point: http://gmap3.net/examples/tags.html UPDATE - ive tried the following: $.each(markers, function(i, marker){ marker.click(function(){ alert('alert'); }); }); $.each(markers, function(i, marker){ $(marker).click(function(){ alert('alert'); }); }); UPDATE Ive tried adding this middle section to existing code: $.each(markers, function(i, marker){ marker.setMap( checked ? map : null); //added code begins $(marker).click(function(){ alert('dfd'); }); //added code ends });

Pause and play google map marker animation

血红的双手。 提交于 2019-12-05 10:12:50
问题 A little new to javascript maps/Gmap3... I am trying to show markers on a map one by one using google map DROP animation. The animation is working fine. Here is my JS var ll = []; var JSONData; var pathData = []; var tick = 10; $(document).ready(function() { $('#ctl00_ContentPlaceHolder1_rewind').button(); $('#ctl00_ContentPlaceHolder1_play').button(); $('#ctl00_ContentPlaceHolder1_stop').button(); $('#ctl00_ContentPlaceHolder1_forward').button(); }); function pageLoad(sender, args) { $('

Pause and play google map marker animation

萝らか妹 提交于 2019-12-03 21:24:46
A little new to javascript maps/Gmap3... I am trying to show markers on a map one by one using google map DROP animation. The animation is working fine. Here is my JS var ll = []; var JSONData; var pathData = []; var tick = 10; $(document).ready(function() { $('#ctl00_ContentPlaceHolder1_rewind').button(); $('#ctl00_ContentPlaceHolder1_play').button(); $('#ctl00_ContentPlaceHolder1_stop').button(); $('#ctl00_ContentPlaceHolder1_forward').button(); }); function pageLoad(sender, args) { $('#ctl00_ContentPlaceHolder1_rewind').button(); $('#ctl00_ContentPlaceHolder1_play').button(); $('#ctl00

Google map : mouseup event not catched by IE7 and IE8 when dropping item

懵懂的女人 提交于 2019-12-02 20:53:02
问题 I am not able to understand why this fiddle doesn't work well with IE7 and IE8. The target is to drag a balloon on the map and catch the mouseup event to retrieve the coordinates where the item has been dropped. The event is fired correctly on all browsers (IE7 and IE8 included) if the user is not dragging a balloon. But, if the user is dragging a balloon, IE7 and IE8 don't catch the event... Is there someone to understand what is happening? To test the fiddle : do not click on the map, just

Google map : mouseup event not catched by IE7 and IE8 when dropping item

我与影子孤独终老i 提交于 2019-12-02 10:13:41
I am not able to understand why this fiddle doesn't work well with IE7 and IE8. The target is to drag a balloon on the map and catch the mouseup event to retrieve the coordinates where the item has been dropped. The event is fired correctly on all browsers (IE7 and IE8 included) if the user is not dragging a balloon. But, if the user is dragging a balloon, IE7 and IE8 don't catch the event... Is there someone to understand what is happening? To test the fiddle : do not click on the map, just drag and drop balloons Note : IE7 and IE8 have been tested through the IE9 developer options It is

How to center the Google Map NOT at the center of the screen?

徘徊边缘 提交于 2019-12-02 03:56:35
问题 I have a site based on Google Maps (using gmap3), which has markers and a floating widget above it, that contains a text about the active marker. This floating widget takes about half of the screen. The map is automatically centered (or panned to) the active marker. As you see from the above, the active marker in the center of the screen is very close to the right side of the text widget (which covers almost all left side of the screen). I would like to have it more loose - say, not in the

How to center the Google Map NOT at the center of the screen?

北慕城南 提交于 2019-12-02 02:19:53
I have a site based on Google Maps (using gmap3), which has markers and a floating widget above it, that contains a text about the active marker. This floating widget takes about half of the screen. The map is automatically centered (or panned to) the active marker. As you see from the above, the active marker in the center of the screen is very close to the right side of the text widget (which covers almost all left side of the screen). I would like to have it more loose - say, not in the center of the screen, but about 2/3 from the left and 1/3 from the right (horizontally, of course;

Google Maps API error: DeletedApiProjectMapError

流过昼夜 提交于 2019-11-30 16:50:55
I have to use google map. I use below google API script <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=MY_API_KEY"></script> And i got below Error Google Maps API error: DeletedApiProjectMapError https://developers.google.com/maps/documentation/javascript/error-messages#deleted-api-project-map-error I created a New Project & New API key. But still this error came. Kindly help to solve this error. Yo should go to https://console.developers.google.com and after create your API KEY, go to "Google Maps JavaScript API" and just ENABLE (by default is DISABLE)