google-maps,google-maps-api-3,markerclustererRelated issues-Collection of common programming errors
user1888321
javascript google-maps google-maps-api-3 callback
I followed Google’s documentation closely, but for some reason my callback function isn’t being called. I stripped everything down so that it should just show an alert, and it doesn’t. I’ve tried searching for the problem, but it’s so simple I can’t even figure out what to search for. Any thoughts?service = new google.maps.places.PlacesService(myMap); service.nearbySearch(request, callback);// this displays alert(“TESTING”);…function callback(results, status) {// this does not displayalert(
user3050910
java android xml google-maps map
I’m having trouble with GoogleMaps in my Android Application.My app crashes when I use my GoogleMap() class and I don’t realize why this is happening. Would be great if you could help me solving this issue, since I’m two days trying to solve this and I can’t.Here is my manifest.xml:<?xml version=”1.0″ encoding=”utf-8″?> <manifest xmlns:android=”http://schemas.android.com/apk/res/android”package=”com.mymaptest.maptest”android:versionCode=”1″android:versionName=”1.0″ ><uses-sdkandro
Haziq Salim
java android google-maps
I am learning android google map development and I am following a tutorial on youtube, and it success to run this code and after that I insert a few code to display map marker on the map to get location but it getting “Unfortunately App has Stopped”, it looks that the problem is when I execute googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL) method.This mainactivity.javapackage com.example.mymap;import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap;
pewe
mysql xml google-maps google-maps-api-3
I have 2 google map scripts (both for api V3).One is designed to use data from an xml file which is hard coded. The other is designed to use a ‘php’ script to create an xml file by drawing the data from a sql database each time the map is loaded.I want to use the first script (it has other map features compared to the second), but want to draw the data from my sql database.When I modify the script in first file to do this it does not work (ie no markers are loaded in the map).here is the xml fi
Genadinik
google-maps geolocation latitude-longitude
I am using mostly google maps version 2 on my pages, but now I am trying to work from an example which is v3. Should that be ok? Will it have any strange effects on my application?What is the best way to smoothly upgrade in versions of google maps in an application?Thanks, Alex
Nirav Kamani
android google-maps
I am having one main activity in which i am having one button when this button is pressed it shows the Map.This works perfect.But when i am pressing the back key i am again going to my main activity and now when once again i am pressing the button for Map it shows whole world map.I mean to say it starts from the scratch.How can i completely remove my map activity from Back Stack and create again to show Map once again as i wanted?Or Any other Solutions to do it?EDIT:1btn_find_atm.setOnClickListe
Dusda
javascript google-maps internet-explorer-7 google-maps-api-3
I have a map that initializes a google map when the user clicks on a button. This fires an event that runs this method:$self.maps = {loadMap : function(){var canvasDom = “map”;var latlng = new google.maps.LatLng(40.7608, -111.8910);var myOptions = {zoom: 12,center: latlng,mapTypeId: google.maps.MapTypeId.ROADMAP};$self.vars.maps.map = new google.maps.Map(document.getElementById(canvasDom), myOptions);}, //other methods in the object for handling other maps stuff… };When the last line is called
user195257
google-maps google-maps-api-3
Im using svg markers on a google map, i get the error”Unexpected call to method or property access”in IE 8/7. I’ve narrowed it down the my icon styles.var icon_style = {path: ‘M-7.448-25.219c0-4.087 3.334-7.4 7.446-7.4s7.447 3.313 7.447 7.4S4.109-17.82-0.003-17.82 S-7.448-21.134-7.448-25.219z M-12.661-24.296c0 3.096 3.778 9.622 3.778 9.622l8.88 14.8l8.371-14.798c0 0 4.287-6.573 4.287-9.622 c0-6.947-5.667-12.578-12.658-12.578C-6.992-36.872-12.661-31.243-12.661-24.296z’,fillColor: ‘#219e84’,fillOp
user3093175
javascript google-maps
I’m getting this from my console when I debug it Uncaught SyntaxError: Unexpected end of input.Here’s my html:<script type=”text/javascript”>src=”https://maps.googleapis.com/maps/api/js?key=MYKEYHERE&sensor=false”> </script> <div id=”map”></div>And my Javascript:var mapOptions = {center: new google.maps.LatLng(30.249281,-97.81305),zoom: 12,mapTypeId: google.maps.MapTypeId.ROADMAP };var map = new google.maps.Map(document.getElementById(‘map’), mapOptions);var marker
j0k
android google-maps
why Unexpected namespace prefix “xmlns” found for tag fragmentUnexpected namespace prefix “map” found for tag fragment?<RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android”xmlns:tools=”http://schemas.android.com/tools”android:layout_width=”match_parent”android:layout_height=”match_parent”tools:context=”.Main”><fragment xmlns:android=”http://schemas.android.com/apk/res/android”xmlns:map=”http://schemas.android.com/apk/res-auto”android:id=”@+id/map”android:name=”com
user1888321
javascript google-maps google-maps-api-3 callback
I followed Google’s documentation closely, but for some reason my callback function isn’t being called. I stripped everything down so that it should just show an alert, and it doesn’t. I’ve tried searching for the problem, but it’s so simple I can’t even figure out what to search for. Any thoughts?service = new google.maps.places.PlacesService(myMap); service.nearbySearch(request, callback);// this displays alert(“TESTING”);…function callback(results, status) {// this does not displayalert(
pewe
mysql xml google-maps google-maps-api-3
I have 2 google map scripts (both for api V3).One is designed to use data from an xml file which is hard coded. The other is designed to use a ‘php’ script to create an xml file by drawing the data from a sql database each time the map is loaded.I want to use the first script (it has other map features compared to the second), but want to draw the data from my sql database.When I modify the script in first file to do this it does not work (ie no markers are loaded in the map).here is the xml fi
Kara
google-maps-api-3
Pardon my noobishness, but, although I’ve seen this issue discussed, I haven’t found an answer. I am trying to draw concentric circles on a Google Map using the API v3, making each clickable as on a bullseye target, but always the largest one ends up on top, which means it is the only clickable one.The following uses an array called “subjects” that consists of increasing radii and various fillcolors.for (i=0;i<subjects.length;i++) {radi = subjects[i][0];fillcolr = subjects[i][1];zindx = subje
Dusda
javascript google-maps internet-explorer-7 google-maps-api-3
I have a map that initializes a google map when the user clicks on a button. This fires an event that runs this method:$self.maps = {loadMap : function(){var canvasDom = “map”;var latlng = new google.maps.LatLng(40.7608, -111.8910);var myOptions = {zoom: 12,center: latlng,mapTypeId: google.maps.MapTypeId.ROADMAP};$self.vars.maps.map = new google.maps.Map(document.getElementById(canvasDom), myOptions);}, //other methods in the object for handling other maps stuff… };When the last line is called
user195257
google-maps google-maps-api-3
Im using svg markers on a google map, i get the error”Unexpected call to method or property access”in IE 8/7. I’ve narrowed it down the my icon styles.var icon_style = {path: ‘M-7.448-25.219c0-4.087 3.334-7.4 7.446-7.4s7.447 3.313 7.447 7.4S4.109-17.82-0.003-17.82 S-7.448-21.134-7.448-25.219z M-12.661-24.296c0 3.096 3.778 9.622 3.778 9.622l8.88 14.8l8.371-14.798c0 0 4.287-6.573 4.287-9.622 c0-6.947-5.667-12.578-12.658-12.578C-6.992-36.872-12.661-31.243-12.661-24.296z’,fillColor: ‘#219e84’,fillOp
jacob
javascript google-maps-api-3 syntax-error flot
The following is triggering a syntax error (unexpected identifier in Chrome, and missing ] after element list in Firefox):infowindow.setContent(‘<h3>’+locale+’ (‘+hour+’:00): $’+s.total+'</h3><img src=”‘+fname+'” onclick=”open_dialog(‘+flot_data+’);” style=”cursor:pointer;” />’);Specifically, the ‘+flot_data+’ in onclick=”open_dialog(‘+flot_data+’);”. Removing this bit removes the syntax error.Firebug points (literally) to flot_data which it represents with [object Object] (it
Vishal Khialani
drupal google-maps-api-3 drupal-7
Goal: To render a google map using geolocation.I am trying to implement the below example on my site.http://code.google.com/apis/maps/documentation/javascript/services.html#GeocodingWorking demo: http://code.google.com/apis/maps/documentation/javascript/examples/geocoding-simple.htmlI have implemented the code in my drupal_add_js() in hook_init() but I am getting an error Parse error: syntax error, unexpected T_STRING in /home/vishal/public_html/dev/sites/all/modules/customvishal/customvishal.mo
Zia Ur Rehman
jquery google-maps-api-3 geocoding document.ready ready
This question already has an answer here:retrieving lat/long of location using google.maps.geocoder3 answersI have been using JavaScript and jQuery for a while now. But I still haven’t fully grasped how it all works. I profusely apologize if my question is redundant, incomprehensible and/or plain stupid.I am using Google Maps API v3 in combination with jQuery (no plugins, just plain jQuery) to populate a div#googleMap with map of London. In addition to that, I’m trying to write a function to get
Emilc
javascript google-maps-api-3
I have this line of code in my javascript:console.log(google.maps.LatLng(49.220341,17.649555));And console returns object with google maps Lat and Lng, which is what I expected, but:Then I’m trying to do this:var start = “49.220341,17.649555”; console.log(google.maps.LatLng(start));But console returns empty object with NaN values.
SKPaul
google-maps google-maps-api-3
I’m changing a marker position to somewhere else in google map in runtime. It works nicely.I also want to set the map center position to that latlon. But map becomes gray when i change the center latlon. Here is my code-var myLatlng = new google.maps.LatLng(20.780691190209286, 80.41932580000002); var currentMarker = myMarkers[0]; currentMarker.setPosition(myLatlng); var center = new google.maps.LatLng(myLatlng); myMap.setCenter(center); google.maps.event.trigger(myMap, ‘resize’); myMap.setZoom(m
user1871407
javascript google maps markerclusterer
I am trying to implement MarkerClusterer V3 in my google maps but can’t make it working :(. Google maps code below : <!DOCTYPE html> <html><head> <meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″> <meta name=”viewport” content=”initial-scale=1.0, user-scalable=no” /> <title>????by??????</title> <link rel=”stylesheet” href=”styletenki.css” /><!–[if lte IE 9]><link rel=”stylesheet” href=”styleie.css” /><![endif]–>
user2130449
leaflet geojson markerclusterer
I’ve been searching for hours and hours now, and i’m still stuck. I have a feeling it is something easy/stupid i’m missing.I am using the example of markercluster from GitHub. I have 2 different markers (simply 2 different colors) that i would like to show which i would defined in the json format. I have followed guide from leaflet site to define different markers. I added my variable to the json part, but i can not figure out how to make the map load the different markers. It’s either giving me
clifgray
javascript google-maps google-maps-api-3 markerclusterer
I have the following code to try to get the MarkerClusterer library to work for my Google Map but for some reason it doesn’t change anything. I have some jinja2 in there for the loop but that is all working properly. Can you see any errors?<meta name=”viewport” content=”initial-scale=1.0, user-scalable=no” /><style type=”text/css”>html { height: 100% }body { height: 100%; margin: 0; padding: 0 }#map_canvas { height: 100% }</style><script type=”text/javascript” src=”http://
user2367645
google-maps caching markerclusterer
I have a website built from Google Maps and using MarkerClusterer. This site works fine most of the time, but there will be times when multiple users will be online and a filtered marker sets request will be returned incorrectly.Example: I filter to a set of markers based on a set of filter parameters. As this is processing someone else also filters to a different set of markers and those markers are returned to me instead of my request.I can also see this issue occur if I sit on the page and
ben f.
asp.net google-maps google-maps-api-3 markerclusterer
I have a public-facing site using GoogleMaps API v3 and the MarkerClusterer library. The page that is having a problem can be found here (http://www.mihomes.com/Find-Your-New-Home/San-Antonio-Homes). If you view this page in IE9 or Chrome, the correct pin icon images are shown, while in previous IE versions and Firefox different (and incorrect) pin icons.IE9Firefox 3.6.8Here is the JavaScript code that generates the pins/clustering:$(function() {var dl_grid = new DLGrid(“.GMapGrid”);dl_grid.in
Axel Isouard
javascript google-maps google-maps-api-3 google-maps-markers markerclusterer
Trying to run markerclusterer within an if statement dependant on the map zoom level (end goal is to run a more specific version at low levels).I have the map rendering out at a certain zoom level and the clusterer working fine, however it seems when I continue to zoom the markers are duplicated building on top of each other.I am trying to clear the markers and rebuild on each zoom as a work around, but im not sure of where to place resetViewport() to do this? I keep getting an undefined error f
user772401
javascript json google-maps google-maps-api-3 markerclusterer
I copied everything from the Google marker clusterer example here and just changed the data for the points I want to use and the markers won’t show up on my mapp.. any idea why (code below)?Chrome is giving me one warning”resource interpreted as Script but transferred with MIME …etc, etc… “…data.json”However, I printed the data using the document.write(data[i].lat) and such and everything prints fine…<!DOCTYPE> <html><head><meta http-equiv=”content-type” content=”tex
user198003
google-maps-api-3 markerclusterer
to create map clusterer, i use:markerClustererGPC = new MarkerClusterer(myMap.map, markersGPC, GPCOptions);but sometimes it does not works, and markerClustererGPC is sometimes undefined.i search on this problem, and realise that (it looks like) server is sometimes too fast, and cluster is not defined due to that.if server is a bit older (slower), it works without problems.am i right about this? what can i do to avoid this problem, to make my code proper to work on any server?
Tom Duke
google-maps google-maps-api-3 markerclusterer
I’m using code found here: Integrating Spiderfier JS into markerClusterer V3 to explode multi-markers with exact same long / lat to restrict zoom levels when clicking on MarkerClusterer created clusters containing points at the same location.Live example is here: http://www.adultlearnersfestival.com/newsite/yourarea/map.htmlI’m getting an error in Firebug however:Error: TypeError: markers is undefined and can’t work out what’s causing it. The specific code is:var minClusterZoom = 14; mc.setMaxZ
Smickie
jquery ajax maps google-maps-api-3 markerclusterer
This is driving me mental.I’m using MarkerCluster with google maps v3, and it works fine in FF, however when I (and the client) kick it up in Chrome or Safari the clusters arn’t there.No errors, just not working in webkit.A few notes: it’s coming from some ajax-loaded json and it’s in jquery.This is the function taking care of the adding:add_clusters: function() {markers = [];$.each( interpreters, function ( i, interpreter ){//maps.add_postcode_marker(i, ‘interpreter’);var latLng = new google.ma
Web site is in building