com.lynden.gmapsfx.service.elevation.PathElevationRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of GMapsFX Show documentation
Show all versions of GMapsFX Show documentation
A Java API for using Google Maps within a JavaFX application.
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.lynden.gmapsfx.service.elevation;
import com.lynden.gmapsfx.javascript.JavascriptObject;
import com.lynden.gmapsfx.javascript.object.GMapObjectType;
import com.lynden.gmapsfx.javascript.object.LatLong;
/**
*
* @author Geoff Capper
*/
public class PathElevationRequest extends JavascriptObject {
public PathElevationRequest() {
super(GMapObjectType.OBJECT);
}
public PathElevationRequest(LatLong[] path, int samples) {
super(GMapObjectType.OBJECT);
getJSObject().setMember("path", getJSObject().eval("[]"));
for (int i = 0; i < path.length; i++) {
getJSObject().eval(getVariableName()+".path.push("+path[i].getVariableName()+")");
}
getJSObject().setMember("samples", samples);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy