It's not Google Maps causing this, but a combination of a few other things.
The jQuery script that you are using has a reference to a source-map file ... and Chrome has an option enabled to use that source-map (once you are in the dev tools) - and if that source-map isn't there - then boom 404!
jquery-1.10.1.min.map not found
Hi,
I'm using Google Maps Datatype 2.1.0 in Umbraco 6.1.5.
my version of jQuery is 1.10.1 . However, when I check the Network traffic in Chrom Dev, I'm getting a 404 error for:
jquery-1.10.1.min.map
Should I use an older version of jQuery?
Thanks for the advice,
Anthony
Hi Anthony,
It's not Google Maps causing this, but a combination of a few other things.
The jQuery script that you are using has a reference to a source-map file ... and Chrome has an option enabled to use that source-map (once you are in the dev tools) - and if that source-map isn't there - then boom 404!
Options are:
See this Stack Overflow page for more details: http://stackoverflow.com/questions/18365315/jquerys-jquery-1-10-2-min-map-is-triggering-a-404-not-found
I believe that Chrome only attempts to download source-maps once you go into the dev-tools, so regular visitors of your website wont experience this.
Cheers,
- Lee
Hi Lee,
Thanks for your reply. I switched the jQuery version, now I'm using jQuery 1.7.2 and the error message for the missing map referrence is gone.
However I'm not seeing any map. I'm just seeing the Google Map Data Type coördinates:
51.916208,4.523255000000063,13
My script looks like this:
<script type="text/javascript">
$(document).ready(function () {
$('section[class=map]').each(function() {
$(this).addClass('mapdimensions');
var mapId = $(this).attr('id');
var value = $(this).html();
value = $.trim(value);
var point = value.split(',');
var lat = parseFloat(point[0]);
var lon = parseFloat(point[1]);
var zoom = parseFloat(point[2]);
var p = new google.maps.LatLng(lat, lon);
var myOptions = {
center: p,
zoom: zoom,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
fm = new google.maps.Map(document.getElementById(mapId),
myOptions);
var marker = new google.maps.Marker({
position: p,
title:"We are here!",
animation: google.maps.Animation.DROP
});
// To add the marker to the map, call setMap();
marker.setMap(fm);
});
});
</script>
This script has always worked in previous projects.
My html element on the page looks like this:
<section id="map" class="row-fluid map">
@if (Model.Content.HasValue("activityGoogleMap"))
{
<h2>Map</h2>
@Model.Content.GetPropertyValue("activityGoogleMap")
}
</section>
ps: sorry, I erroneously clicked the 'Solved' link. Wish I could undo this.
Sounds like there's another JS error somewhere? (The value from the data-type itself appears fine)
yeah, it must be this part:
$('section[class=map]')
for some reason, when I try this in the Chrom Console, I'm getting an empty array back
I use jQuery v 1.10.2 now and downloaded the Map file for jQuery 1.10.2
when I debug the page, I'm seeing this error:
So for some reason, this method in my script has stopped working:
var p = new google.maps.LatLng(lat, lon);
Ok, I'm already this far that an empty Google Map appears on the screen:
anyone experienced the same problem? And how did you solve it, thanks for your help,
Anthony
is working on a reply...