Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Started gets error due to undeclared dependencies #178

Open
PeterVermont opened this issue Oct 2, 2016 · 4 comments
Open

Getting Started gets error due to undeclared dependencies #178

PeterVermont opened this issue Oct 2, 2016 · 4 comments

Comments

@PeterVermont
Copy link

The getting started documentation says that you simply need to add vizicities js and css but this does not work due to need for three.js

Got error in console:

TypeError: o.default is undefined

Similar apparent dependency on TweenMax:

TypeError: v.default is undefined
file:///Users/andrews/Documents/dev/vizicities/dist/vizicities.min.js
Line 3

@netfish88
Copy link

which branch do you use ?

@PeterVermont
Copy link
Author

clone of master branch. The attached file is simply the index.html from the examples->basic folder with the script tags for the vendor librariies commented out:

<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1">
  <title>Basic ViziCities Example</title>
  <link rel="stylesheet" href="main.css">
  <link rel="stylesheet" href="../../dist/vizicities.css">
</head>
<body>
  <div id="world"></div>

 <!--
 <script src="../vendor/three.min.js"></script>
  <script src="../vendor/TweenMax.min.js"></script>
 -->
  <script src="../../dist/vizicities.min.js"></script>

  <script src="main.js"></script>
</body>
</html>

index_no_vendor.zip

The javascript console shows these errors:

image

The page is blank.

@robhawkes
Copy link
Member

You should be able to download the master branch and run the basic example HTML in a browser and everything will just work. I just tested this out and it all loads ok for me.

Three.js and TweenMax are currently dependencies and I need to update the getting started to make this obvious. ViziCities won't work if you leave these out like in the code you pasted previously.

@PeterVermont
Copy link
Author

Yes - we understand each other. This bug report was specifically about the Getting Started section of the documentation.

Rob -- I really like vizicities but I had a couple of questions. Did you get my email to [email protected]?

  1. I wish to cause my GeoJSON layer to be redrawn so that my style function is called again (so I can change the color of my polygons).
    Could not find any update, refresh, etcetera. Tried removing and re-adding a layer which sort of works except that the layer objects keeps increasing its number of features…
  2. In addition to the nice mouse and touch controls would like to have buttons for tilt and zoom. The zoomBy, tiltBy, etcetera methods in Controls are empty functions so I did not know how to hook up my controls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants