Closed luigiruocco closed 8 years ago
Hi Luigiruocco
you are probably using the "wrong" Polyline
class. There is a class Polyline
in package com.lynden.gmapsfx.javascript.object
an one in package com.lynden.gmapsfx.shapes
. The later one is the one to use in your case.
Hi, thanks for response!!! It work!
Closing this issue.
I use GMapsFX 1.1.1 I try to add a Polyline to GoogleMap with this code:
LatLong ll1 = new LatLong(47.6197, -122.3231); LatLong ll2 = new LatLong(47.6297, -122.3431); LatLong[] ary = new LatLong[]{ll1, ll2}; MVCArray mvc = new MVCArray(ary); PolylineOptions polyOpts = new PolylineOptions() .path(mvc) .strokeColor("red") .strokeWeight(2); Polyline poly = new Polyline(polyOpts); map.addMapShape((MapShape) poly);
In the last line of code I get a compilation error because the polyline is not an instance of MapShape. Where is the mistake?