Search Results

Search found 547 results on 22 pages for 'marker'.

Page 8/22 | < Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >

  • How to check of which user-defined type a current JSON element is during $.each()?

    - by Bob
    I have the following structure for a JSON file: ({condos:[{Address:'123 Fake St.', Lat:'56.645654', Lng:'23.534546'},{... another condo ...},{...}],houses:[{Address:'1 Main Ave.', Lat:'34.765766', Lng:'27.8786674'},{... another house ...}, {...}]}) So, I have a list of condos and houses in one big JSON array. I want to plot them all on my map, but I want to give condos and houses different marker icons( blue marker for condos, green marker for houses ). Problem I have is - figuring out how to distinguish between types of markers when I $.each() through them. How would I use if to check whether I'm working with a condo or a house at the moment? var markers = null; $('#map').gmap(mapOptions).bind('init', function(){ $.post('getMarkers.php', function(json){ markers = json; $.each(markers, function(type, dataMembers) { $.each(dataMembers, function(i, j){ //if house use house.png to create marker $('#map').gmap('addMarker', { 'position': new google.maps.LatLng(parseFloat(Lat), parseFloat(Lng)), 'bounds':true, 'icon':'house.png' } ); //if condo use condo.png $('#map').gmap('addMarker', { 'position': new google.maps.LatLng(parseFloat(Lat), parseFloat(Lng)), 'bounds':true, 'icon':'condo.png' } ); }); }); }); });

    Read the article

  • embed google map in wpf control

    - by Dave Turvey
    Hi, I am trying to create a wpf control that will display a map image using google maps. I want to be able to centre the map on a longitude and latitude specified by the application. Ideally, the control will then allow the user to move a map marker and store the latitude/longitude of the marker in the application. The only way I can think of doing this is to use a WebBrowser control and create a HTML string at runtime that shows a map of the desired location. This seems like an awkward solution and won't allow me to easily retrieve the marker location. Does anyone know of a better way to accomplish this?

    Read the article

  • Why isn't my bundle getting passed?

    - by NickTFried
    I'm trying to pass a bundle of two values from a started class to my landnav app, but according to the debug nothing is getting passed, does anyone have any ideas why? package edu.elon.cs.mobile; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.EditText; public class PointEntry extends Activity{ private Button calc; private EditText longi; private EditText lati; private double longid; private double latd; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.pointentry); calc = (Button) findViewById(R.id.coorCalcButton); calc.setOnClickListener(landNavButtonListener); longi = (EditText) findViewById(R.id.longitudeedit); lati = (EditText) findViewById(R.id.latitudeedit); } private void startLandNav() { Intent intent = new Intent(this, LandNav.class); startActivityForResult(intent, 0); } private OnClickListener landNavButtonListener = new OnClickListener() { @Override public void onClick(View arg0) { Bundle bundle = new Bundle(); bundle.putDouble("longKey", longid); bundle.putDouble("latKey", latd); longid = Double.parseDouble(longi.getText().toString()); latd = Double.parseDouble(lati.getText().toString()); startLandNav(); } }; } This is the class that is suppose to take the second point package edu.elon.cs.mobile; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; import com.google.android.maps.MyLocationOverlay; import com.google.android.maps.Overlay; import android.content.Context; import android.graphics.drawable.Drawable; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.location.Location; import android.location.LocationManager; import android.os.Bundle; import android.util.Log; import android.widget.EditText; import android.widget.TextView; public class LandNav extends MapActivity{ private MapView map; private MapController mc; private GeoPoint myPos; private SensorManager sensorMgr; private TextView azimuthView; private double longitudeFinal; private double latitudeFinal; double startTime; double newTime; double elapseTime; private MyLocationOverlay me; private Drawable marker; private GeoPoint finalPos; private SitesOverlay myOverlays; public LandNav(){ startTime = System.currentTimeMillis(); } public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.landnav); Bundle bundle = this.getIntent().getExtras(); if(bundle != null){ longitudeFinal = bundle.getDouble("longKey"); latitudeFinal = bundle.getDouble("latKey"); } azimuthView = (TextView) findViewById(R.id.azimuthView); map = (MapView) findViewById(R.id.map); mc = map.getController(); sensorMgr = (SensorManager) getSystemService(Context.SENSOR_SERVICE); LocationManager lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE); Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER); int longitude = (int)(location.getLongitude() * 1E6); int latitude = (int)(location.getLatitude() * 1E6); finalPos = new GeoPoint((int)(latitudeFinal*1E6), (int)(longitudeFinal*1E6)); myPos = new GeoPoint(latitude, longitude); map.setSatellite(true); map.setBuiltInZoomControls(true); mc.setZoom(16); mc.setCenter(myPos); marker = getResources().getDrawable(R.drawable.greenmarker); marker.setBounds(0,0, marker.getIntrinsicWidth(), marker.getIntrinsicHeight()); me = new MyLocationOverlay(this, map); myOverlays = new SitesOverlay(marker, myPos, finalPos); map.getOverlays().add(myOverlays); } @Override protected boolean isRouteDisplayed() { return false; } @Override protected void onResume() { super.onResume(); sensorMgr.registerListener(sensorListener, sensorMgr.getDefaultSensor(Sensor.TYPE_ORIENTATION), SensorManager.SENSOR_DELAY_UI); me.enableCompass(); me.enableMyLocation(); //me.onLocationChanged(location) } protected void onPause(){ super.onPause(); me.disableCompass(); me.disableMyLocation(); } @Override protected void onStop() { super.onStop(); sensorMgr.unregisterListener(sensorListener); } private SensorEventListener sensorListener = new SensorEventListener() { @Override public void onAccuracyChanged(Sensor arg0, int arg1) { // TODO Auto-generated method stub } private boolean reset = true; @Override public void onSensorChanged(SensorEvent event) { newTime = System.currentTimeMillis(); elapseTime = newTime - startTime; if (event.sensor.getType() == Sensor.TYPE_ORIENTATION && elapseTime > 400) { azimuthView.setText(Integer.toString((int) event.values[0])); startTime = newTime; } } }; }

    Read the article

  • How to add labels on Google Maps Pinpoints?

    - by Jason
    Creating a google map with store locations within 50 miles of user entered address. Have map & pinpoints showing correctly but all of the pinpoints just have a dot on them. I'd like to be able to label them A, B, C, D, etc so that I can list out locations & addresses in sidebar. How would I do this? Here's the code I'm using to add my pinpoints. var point = new GLatLng(latitude, longitude); var marker = new GMarker(point); GEvent.addListener(marker, "click", function () { map.openInfoWindowHtml(point, myHtml); }); map.addOverlay(marker);

    Read the article

  • google maps v3 distance

    - by Shane
    Trying to create a new version of the map functions seen here: http://www.daftlogic.com/projects-google-maps-distance-calculator.htm but using the v3 api. So far I am able to set markers on click and can draw the geodesic polyline. The issues I am currently running into are: Updating the poly-line on marker drag I'm pretty sure I have to put each marker in an array and do a for loop so that I can keep clicking and adding points that will add to the total distance. Properly displaying distance. I have created a jsfiddle: http://jsfiddle.net/wyZyS/ EDIT: I realize I have nothing calling the "update" function. I am trying to create the array for each marker currently. The calculation you see is converting meters to nautical miles.

    Read the article

  • Google Maps Api v2 error

    - by Harry
      var mymarkers= []; //array function createMarker(point,html,ref){ var marker = new GMarker(point); mymarkers[ref] = marker; GEvent.addListener(newmarker,'click',function(){newmarker.openInfoWindowHtml(html);}); map.addOverlay(newmarker); } This function works well, it adds a marker to the map no problem, but when trying to use mymarkers[] array of markers they have not been stored? Is there a validator to check the GMarker is nice and clean? google maps main.js throws a wobbly: Uncaught TypeError: Cannot read property '__e_' of undefined

    Read the article

  • Google Maps setCenter() problem

    - by hotcoder
    I'm using google maps. In my code i've used setCenter() function. My problem is that marker is always located on top left corner of map area (not at the center). Please tell me how to resolve it? My piece of code is lat = 46.437857; lon = -113.466797; marker = new GMarker(new GLatLng(lat, lon)); var topRight = new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(20, 40)); map.addControl(new GLargeMapControl3D(), topRight); map.setCenter(new GLatLng(lat, lon), 5); map.addOverlay(marker);

    Read the article

  • GoogleMaps API v3 - Need help with two "click" event scenarios. Need similar functionality to v2 AP

    - by Nathan Raley
    In version 2 of the API the map click event returned an Overlay, LatLng, Overlaylatlng. I used this to create a generic map event that would either retrieve the coordinates of the Map click event, or return the coordinates of a Marker or other type of Overlay. Now that API v3 doesn't return the Overlay or Overlaylatlng during the map click event, how can I go about creating a generic "click" event for the map that works if the user clicks on a marker or overlay? I really don't want to create a click event for each marker I have on my page as I am creating anywhere from a handful to a couple thousand markers. Also, I had to create a custom ImageMapType in order to display the StreetViewOverlay like we could do in v2 of the API because I couldn't find anywhere that told me how to add the StreetViewOverlay without the pegman icon. How can I go about retrieving the LatLng coordinates of a click on this overlay type as well?

    Read the article

  • how to add multiple markers to mapview in android?

    - by Vishakha Kinjawadekar
    I am working on android geolocation application in that I have added marker for current location and want to add markers for other geopoints also. I have created objects of OverlayItem for other points and adding it to ItemizedOverlay like itemizedOverlay.addOverlay(overlayItem) and then adding it to mapOverlay.add(itemizedOverlay). For the current location geopoints getting from "Location" object and other points are hard-coded values. After executing it only current location marker is displayed not the other hardcoded points.How can I add marker for these geopoints and where? Thanks , Vishakha.

    Read the article

  • how can this inner enum code be improved ?

    - by mafalda
    I have this construct public class Constants{ enum SystemA implements Marker{ ConstOne(1), ConstTwo(2), ConstThree(3); SystemA(int i) { number =i; } int number; } enum SystemB implements Marker{ ConstFour(4), ConstFive(5), ConstSix(6); SystemB(int i) { number =i; } int number; } } I have Marker so I can pass to method like this method(Constants.SystemA) or method(Constants.SystemB) What is the best way to list all the enum values ? I also want to make sure that it is not duplicating the number in any of the enums

    Read the article

  • Building a Store Locator ASP.NET Application Using Google Maps API

    The past couple of projects I've been working on have included the use of the Google Maps API and geocoding service in websites for various reasons. I decided to tie together some of the lessons learned, build an ASP.NETstore locator demo, and write about it on 4Guys. Last week I published the first article in what I think will be a three-part series: Building a Store Locator ASP.NET Application Using Google Maps (Part 1). Part 1 walks through creating a demo where a user can type in an address and any stores within a (roughly) 15 mile area will be displayed in a grid.The article begins with a look at the database used to power the store locator (namely, a single table that contains one row for every location, with each location storing its store number, address, and, most important, latitude and longitude coordinates) and then turns to usingGoogle's geocoding service to translatea user-entered address into latitude and longitude coordinates. The latitude and longitude coordinates are used to find nearby stores, which are then displayed in a grid. Part 2 looks at enhancing the search results to include a map with markers indicating the position of each nearby store location. The Google Maps API, along with a bit of client-side script and server-side logic, make this actually pretty straightforward and easy to implement. Here's a screen shot of the improved store locator results. Part 3, which I plan on publishing next week, looks at how to enhance the map by using information windows to display address information when clicking a marker. Additionally, I'll show how to use custom icons for the markers so that instead of having the same marker for each nearby location the markers will be images numbered 1, 2, 3, and so on, which will correspond to a number assigned to each search result in the grid. The idea here is that by numbering the search results in the grid and the markers on the map visitors will quickly be able to see what marker corresponds to what search result. This article and demo has been a lot of fun to write and create, and I hope you enjoy reading it, too. Building a Store Locator ASP.NET Application Using Google Maps API (Part 1) Building a Store Locator ASP.NET Application Using Google Maps API (Part 2) Happy Programming!Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Google maps API : V2 : Custom infowindow with bindInfoWindowHtml

    - by PlanetUnknown
    The API documentation gave me hopes last night with "bindInfoWindowHtml". But it doesn't seem to replace the default infoWindow, even when you provide your own class etc. I have tried using other ideas like the labeledmarker. But it doesn't support draggable markers. Hence can't use it in my application. Here is the sample code which shows the info. window inside, the original bubble. Isn't there a way to override that window as well ! ` <style type="text/css"> .infoWindowCustomClass { width: 500px; height: 500px; background-color: #CAEE96; color: #666; } </style> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title>Google Maps JavaScript API Example</title> <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=false&amp;key="" type="text/javascript"></script> <script type="text/javascript"> function load() { if (GBrowserIsCompatible()) { // Create our "tiny" marker icon var blueIcon = new GIcon(G_DEFAULT_ICON); blueIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png"; // Set up our GMarkerOptions object markerOptions = { icon:blueIcon }; var map = new GMap2(document.getElementById("map")); map.setCenter(new GLatLng(33.968064,-83.377047), 13); markerOptions.title = "fart"; var point = new GLatLng(33.968064,-83.377047); var marker = new GMarker(point); var tempName = document.getElementById("infoWindowCustom"); marker.bindInfoWindowHtml(tempName); map.addOverlay(marker); } } </script>` And here is the DIV - <DIV id="infoWindowCustom" name="infoWindowCustom" class="infoWindowCustomClass"> Name : <TEXTAREA NAME="nameID" ID="nameID" ROWS="2" COLS="25"></TEXTAREA> Comments : <TEXTAREA NAME="commentsID" ID="commentsID" ROWS="4" COLS="25"></TEXTAREA> </DIV>

    Read the article

  • how to redraw markers without redrawing the map? google maps.

    - by vishwanath
    I currently have a implementation where some markers coming from JSON list is shown, on a particular area, Now I want to filter these marker depending upon some criteria, I have done the filtering part, and got the filtered list. Now to render this markers on the map again, The current implementation loads the js with a key again, also creates the GMap2 object and draws the list of marker on the newly created map, which is really annoying. I want map to be there and only markers to be added and removed from the map. Any help is appreciated

    Read the article

  • get city state from google map

    - by apueee
    I'm using google map api for showing location. In that i case i need option to get city sate zip from google map marker. In map , user can move the marker to position it after drag finished it will return the city, state and zip. I have successfully get the lat and lng but how can i get the city , state and zip. please help me as soon as possible..

    Read the article

  • Python Pickle: what can cause stack index out of range error?

    - by Rosarch
    I'm getting this error: File "C:\Python26\lib\pickle.py", line 1374, in loads return Unpickler(file).load() File "C:\Python26\lib\pickle.py", line 858, in load dispatch[key](self) File "C:\Python26\lib\pickle.py", line 1075, in load_obj k = self.marker() File "C:\Python26\lib\pickle.py", line 874, in marker while stack[k] is not mark: k = k-1 IndexError: list index out of range Why could this be happening?

    Read the article

  • Detecting Markers Using OpenCV

    - by Hamza Yerlikaya
    I am trying to detect various objects containing colored markers, so a red blue green marker identifies object A, and a red blue red marker identifies object B. My problem is I can't use template matching cause objects can be rotated, currently I am thinking about check for each color then find the object by checking the distance between colors but it seems inefficient, so my question is there a better way to do this?

    Read the article

  • Removing Directions markers from the Google Maps API V3

    - by anonymous
    To remove a normal marker from a map, I understand you simply call marker.setMap(null), but when implementing the Google Maps directions services, it automatically adds markers A and B onto the map ( calculating directions from point A to point B ). I do not have control over these markers, so I cannot remove them in the normal way. So how can I remove these markers (I have custom markers on the map instead)?

    Read the article

  • show tweets inside div from an asynchronous loop

    - by ak_47
    Am trying to laod tweets into a div after looping them from yahoo placemaker. They are loading on the div but the information shown by them is placemaker's last result. This is the code.. function getLocation(user, date, profile_img, text,url) { var templates = []; templates[0] = '<div><div></div><h2 class="firstHeading">'+user+'</h2><div>'+text+'</div><div><p><a href="' + url + '"target="_blank">'+url+'</a></p></div><p>Date Posted- '+date+'</p></div>'; templates[1] = '<table width="320" border="0"><tr><td class="user" colspan="2" rowspan="1">'+user+'</td></tr><tr><td width="45"><a href="'+profile_img+'"><img src="'+profile_img+'" width="55" height="50"/></a></td><td width="186">'+text+'<p><a href="' + url + '"target="_blank">'+url+'</a></p></td></tr></table><hr>'; templates[2] = '<div><div></div><h2 class="firstHeading">'+user+'</h2><div>'+text+'</div><div><p><a href="' + url + '"target="_blank">'+url+'</a></p></div><p>Date Posted- '+date+'</p></div>'; templates[3] = '<table width="320" border="0"><tr><td class="user" colspan="2" rowspan="1">'+user+'</td></tr><tr><td width="45"><a href="'+profile_img+'"><img src="'+profile_img+'" width="55" height="50"/></a></td><td width="186">'+text+'<p><a href="' + url + '"target="_blank">'+url+'</a></p></td></tr></table><hr>'; var geocoder = new google.maps.Geocoder(); Placemaker.getPlaces(text, function (o) { console.log(o); if (!$.isArray(o.match)) { var latitude = o.match.place.centroid.latitude; var longitude = o.match.place.centroid.longitude; var myLatLng = new google.maps.LatLng(latitude, longitude); var marker = new google.maps.Marker({ icon: profile_img, title: user, map: map, position: myLatLng }); var infowindow = new google.maps.InfoWindow({ content: templates[0].replace('user',user).replace('text',text).replace('url',url).replace('date',date) }); var $tweet = $(templates[1].replace('%user',user).replace(/%profile_img/g,profile_img).replace('%text',text).replace('%url',url)); $('#user-banner').css("visibility","visible");$('#news-banner').css("visibility","visible"); $('#news-tweets').css("overflow","scroll").append($tweet); function openInfoWindow() { infowindow.open(map, marker); } google.maps.event.addListener(marker, 'click', openInfoWindow); $tweet.find(".user").on('click', openInfoWindow); bounds.extend(myLatLng); } }); }

    Read the article

  • Java Program Compiles and Runs, but doesn't work

    - by Richard Long
    When I run this program I enter information in a text box, push the search button, but nothing happens. The program just sits there until I press Cntrl C to break it. It looks like it should work, but I can't figure out what is hanging the program up. Here is the code: First class: import java.io.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.util.*; public class NameGameFrame extends JFrame { public static String name; static JTextField textfield = new JTextField(20); static JTextArea textarea = new JTextArea(30,30); public static String num; public static String [] fields; public static int [] yearRank; public static boolean match; public static int getInts, marker, year, max; public static void main( String[] args) { JFrame frame = new JFrame(); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setTitle("Name Game"); frame.setLocation(500,400); frame.setSize(800,800); JPanel panel = new JPanel(new GridBagLayout()); GridBagConstraints c = new GridBagConstraints(); JLabel label = new JLabel("Enter the Name or Partial Name to search:"); c.gridx = 0; c.gridy = 0; c.insets = new Insets(2,2,2,2); panel.add(label,c); c.gridx = 0; c.gridy = 1; panel.add(textarea,c); JButton button = new JButton("Search"); c.gridx = 1; c.gridy = 1; panel.add(button,c); c.gridx = 1; c.gridy = 0; panel.add(textfield,c); frame.getContentPane().add(panel, BorderLayout.NORTH); frame.pack(); frame.setVisible(true); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ae) { name = textfield.getText(); java.io.File file = new java.io.File("namesdata.txt"); try { Scanner input = new Scanner(file); num = input.nextLine(); NameRecord nr = new NameRecord(name); while (input.hasNext()) { if(match = num.toLowerCase().contains(name.toLowerCase())) { nr.getRank(); nr.getBestYear(marker); } } } catch(FileNotFoundException e) { System.err.format("File does not exist\n"); } textarea.setText(fields[0]); } }); } } This is the second class: import java.io.*; import java.util.*; public class NameRecord { public NameRecord( String name) { } public static int getBestYear(int marker) { switch (marker) { case 1: year = 1900; break; case 2: year = 1910; break; case 3: year = 1920; break; case 4: year = 1930; break; case 5: year = 1940; break; case 6: year = 1950; break; case 7: year = 1960; break; case 8: year = 1970; break; case 9: year = 1980; break; case 10: year = 1990; break; case 11: year = 2000; break; } return year; } public static int getRank() { fields = num.split(" "); max = 0; for (int i = 1; i<12; i++) { getInts = Integer.parseInt(fields[i]); if(getInts>max) { max = getInts; marker = i; } } return max; } }

    Read the article

  • How can I put multiple markers on Google maps with Javascript API v3?

    - by Doe
    Hi, I'd like to know how to put multiple markers for Google Maps using Javascript API v3. I tried the solution posted here: http://stackoverflow.com/questions/1621991/multiple-markers-in-googe-maps-api-v3-that-link-to-different-pages-when-clicked but it does not work for me for some reason. var directionDisplay; function initialize() { var myOptions = { zoom: 9, center: new google.maps.LatLng(40.81940575,-73.95647955), mapTypeId: google.maps.MapTypeId.TERRAIN } var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); setMarkers(map, properties); var properties = [ ['106 Ft Washington Avenue',40.8388485,-73.9436015,'Mjg4'], ]; function setMarkers(map, buildings) { var image = new google.maps.MarkerImage('map_marker.png', new google.maps.Size(19,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var shadow = new google.maps.MarkerImage('map_marker_shadow.png', new google.maps.Size(28,32), new google.maps.Point(0,0), new google.maps.Point(10,32)); var bounds = new google.maps.LatLngBounds; for (var i in buildings) { var myLatLng = new google.maps.LatLng(buildings[i][1], buildings[i][2]); bounds.extend(myLatLng); var marker = new google.maps.Marker({ position: myLatLng, map: map, shadow: shadow, icon: image, title: buildings[i][0] }); google.maps.event.addListener(marker, 'click', function() { window.location = ('detail?b=' + buildings[i][3]); }); } map.fitBounds(bounds); } } </script> Could anyone kindly explain why this doesn't work for me?

    Read the article

  • Open layers multiple mouseover events for multiple markers

    - by Bren G.
    I have the following loop inside an function init(); which is executed "onload", I am having traouble attaching the mouseover event for each marker, the alert i always returns the value of the last loop/iteration? for(i=0; i<document.getElementById('departureSelect').options.length; i++){ var coords = eval(document.getElementById('departureSelect').options[i].value); if(i==0){ window['popup'+i] = new OpenLayers.Marker(new OpenLayers.LonLat(coords[0], coords[1]),icon); }else{ window['popup'+i] = new OpenLayers.Marker(new OpenLayers.LonLat(coords[0], coords[1]),icon.clone()); } window['z'+i] = new OpenLayers.Popup.Anchored(coords[2], new OpenLayers.LonLat(coords[0], coords[1]), new OpenLayers.Size(0,0), '<span class="country-label">' + coords[2] + '</span>', icon, false ); window['z'+i].autoSize = true; window['z'+i].setBorder('1px solid #888'); map.addPopup(window['z'+i]); window['z'+i].hide(); window['popup'+i].events.register('mouseover', window['popup'+i], function(e){ alert(i); // only returns loast iteration of i????? }); countries.addMarker(window['popup'+i]); }

    Read the article

  • Google map API v3 event click raise when clickingMarkerClusterer?

    - by lucian.jp
    I have a Google Map API v3 map object on a page that uses MarkerClusterer. I have a function that need to run when we click on the map to it is registered as: google.maps.event.addListener(map, 'click', function (event) { CallMe(event.latLng); }); So my problem is as follows: When I click on a cluster of MarkerClusterer instead of behaving like a marker and not raise the click event on the map but only the one from the marker it calls the click from the map. To test this I have generated an alert from the markerclusterer click: google.maps.event.addListener(markerClusterer, "clusterclick", function (cluster) { alert('MarkerClusterer click event'); }); So the clusterclick rises after the click event of map object. I then can't remove the listener of map object as a solution. Is there any way to test if there was a clusterer click in the click event of the map? Or a way to replicate the marker behaviour and do not raise the click event of map when clustererclick is called? Google and documentation didn’t help me. Thx

    Read the article

< Previous Page | 4 5 6 7 8 9 10 11 12 13 14 15  | Next Page >