Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

841
Views
¿Cómo puedo resolver? InvalidValueError: setMap: no es una instancia de Map; y no una instancia de StreetViewPanorama

Estoy usando el ejemplo de marcadores de grupos de la API de Google Maps. https://developers.google.com/maps/documentation/javascript/marker-clustering#maps_marker_clustering-javascript

Markerclusterer CDN ya está llamado.

Pero me sale el error de InvalidValueError: setMap: not an instance of Map; and not an instance of StreetViewPanorama

A continuación se muestra el código que utilicé. ¿Qué estoy haciendo mal?

 var map; function initialize() { var mapProp = { center: new google.maps.LatLng(38, -78), zoom: 6, mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map(document.getElementById('map'), mapProp); }; jQuery(document).ready(function() { var url = 'https://opendata.howardcountymd.gov/resource/96q9-qbh7.json'; initialize(); jQuery.getJSON(url, function(data) { jQuery.each(data, function(i, field) { createMarker(data); function createMarker(data) { const labels = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var markers = new google.maps.Marker({ position: new google.maps.LatLng(data[i].location.latitude, data[i].location.longitude), map: map, label: labels[i % labels.length], title: field.crossroad }); }; // Add a marker clusterer to manage the markers. new MarkerClusterer({ markers, map }); }); }); });
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!