Comments (1)
google.maps.KmlLayer
does support a setZIndex
method, though I would guess that it's only relative to other KML layers, so you may not be able to change its zIndex in relation to a radar layer. Aeris.js does not currently support a aeris.maps.layers.KML#setZIndex
method, though you could directly call the method on the underlying gmaps view:
var gmapsKml = kml.getView();
gmapsKml.setZIndex(100);
Note that the google.maps.ImageMapType
which is used to render tile layers does not support setting zIndex. I had to implement a custom ImageMapType
object to handle z-indexes.
The reason we can use zIndexes on the HAMWeather page is that we're using aeris.maps.layers.Advisories
, which is a tile image layer, not a kml layer.
A couple other things:
1: You can use the base aeris.maps.layers.KML
layer. The AdvisoriesKML
layer is simply a version of the KML
layer, configured to use the http://gis.hamweather.net/kml/hwadv_all.kml
endpoint. Also, note that KML
accepts an attrs
object, not a uri string as a constructor argument:
var kml = new aeris.maps.layers.KML({
url: ''http://gis.hamweather.net/kml/hwwarnings.kml'
});
2: It looks like you're creating two KML layer object -- one Aeris.js object, and another gmaps object. I'm guessing that this is not what you're trying to do. If you're trying to get access to a click
event, you can do so directly through the aeris object:
kml.on('click', function(latLon, data) {|
var infobox = new aeris.maps.InfoBox({
position: latLon,
content: data.description
});
infoBox.setMap(map);
// or whatever else you want to do here.
});
3: The aeris KML layer is currently setup to hardcode the suppressInfoWindows
option as true. It would be nice if this wasn't hardcoded, though I did that in order to keep the behavior consistent with other mapping libraries. The good news is that's it's easy enough to popup your own info windows on click (as shown above).
The documentation for all this is sparse, to put it generously -- we're working on that. If you haven't yet, I would suggest taking a peek at the API reference docs. It's not super user-friendly, but it does list out all of the object attributes, events, and methods, which can be helpful.
from aerisjs.
Related Issues (15)
- YUIDoc: "The partial public/header could not be found" HOT 1
- Default map? HOT 1
- maps.Map doesn't support style() (and other google options) HOT 2
- Aeris Map is not updated with Google Map attributes
- Sync breaks after time HOT 2
- Slow down animation? HOT 2
- map.destroy() HOT 3
- Half grey google map HOT 3
- Radar Animations stopped working with google maps HOT 5
- set minimum zoom HOT 3
- markerCollection.stopClustering() hide all markers on map HOT 8
- Google Maps Error: You have included the Google Maps API multiple times on this page. HOT 1
- Can i have UV index of current localtion / HOT 1
- Can't install via bower
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aerisjs.