Bigfoot38#$
Posts: 22
Joined: Sun Mar 27, 2016 7:16 am

Processing USA Map

Mon Dec 18, 2017 7:11 am

The first version ran a few months ago but
No longer does,

I tried 2 versions of usa map.
Both do not run.
Error message:

“NullPointer Exception”

Don’t understand the message and don’t know
What to do about the problem

Also don’t understand what the numbers are
In the url usa = …

Any suggestions.



Original url


// The file "Blank US Map (states only).svg"
// can be found at Wikimedia Commons
usa = loadShape("http://upload.wikimedia.org/wikipedia/c ... _only).svg");
smooth(); // Improves the drawing quality of the SVG
noLoop();
}





Latest url


// The file Blank_US_Map.svg can be found at Wikimedia Commons
usa = loadShape("http://upload.wikimedia.org/wikipedia/c ... US_Map.svg");
smooth(); // Improves the drawing quality of the SVG
noLoop();
}

User avatar
topguy
Posts: 4350
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Processing USA Map

Mon Dec 18, 2017 11:17 am

A host name that contain "upload" does not seems like a good stable choice of server.

Why not use the links here: https://commons.wikimedia.org/wiki/File ... _only).svg
Or even bettter, download the file and keep it on disk.

hippy
Posts: 2859
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Processing USA Map

Mon Dec 18, 2017 11:45 am

Bigfoot38#$ wrote:
Mon Dec 18, 2017 7:11 am
Original url
usa = loadShape("http://upload.wikimedia.org/wikipedia/c ... _only).svg");

Latest url
usa = loadShape("http://upload.wikimedia.org/wikipedia/c ... US_Map.svg");
The first works in my browser, the second returns "404 not found". That is perhaps your problem; it's not there and loadShape returns null.

Return to “General programming discussion”

Who is online

Users browsing this forum: No registered users and 2 guests