Dec 152013
 

I’ve created a page with Maps Marker to show my employers. The address of the main office as a marker. You can hover to see the name of the company, or click on the marker to see the full address and the period I worked there. Click on the My Employers tab on the top of the screen to view it.

For now only the latest three employers, but I will add the rest a.s.a.p.

Sep 102013
 

Since yesterday I started playing Please Stay Calm on my phone. It’s a zombie game, kind of turn based. You have a limited amount of energy (and health of course) that you can use to scavenge for stuff or to hunt/kill zombies. Other than most games, the scavenging and hunting is done GPS based, so the game will list locations (shops, streets, etc) you will know.

Of course you can connect with friends (via Facebook or the app). You need to level to progress. You need money (found by scavenging or by selling stuff you found) to buy weapons, build safehouses, etc.etc.

It’s a simple game to play, the interface is not difficult and you don’t need superfast reflexes to dodge the zombies like most other games. I like it. At the moment I’m only at level 4, but for less than a day playing that seems okay (maybe it’s not).

Have a look here: http://pleasestaycalm.com/ and find the app in the Playstore or on iTunes.

Jul 122013
 

The solution I’m creating for the client is based on Google Maps, so when I showed them some results, they joked that they wouldn’t be able to sell their product to Microsoft, since it’s not based on Bing Maps.

Replacing the basis with Bing Maps is no problem however. But since the map in this solution is used as an entry to filter the data (you draw the region you want to query), I need a (free form) drawing library of some sort. There is no drawing support in Bing Maps what so ever. The only thing present is the Shape Toolbox module someone created back in 2012, and never maintained/updated. Why is there no support for drawing on the map?

To make things worse, if I wanted to create something myself (I learned a thing or two playing with Google Maps) the mouse event returns X and Y values of the screen, not the coordinates on the map where the mouse event took place, so if I want to create something myself, I need to be recalculate the X and Y values to mapcoordinates every single time. There’s a function for it, but it’s a stupid decision to implement it this way. It should be the other way around, because how often would you really need the X and Y values of the screen?

That was my rant. Grrrr….

Jul 042013
 

I found a script to simplify polygons in Google Maps, basically to reduce the number of nodes the polygon is build up from. It does that by some sort of smoothing algorithm, with a distance parameter. Anything under that distance is smoothed out (read: deleted). It’s a Google Maps V2 script, but I modified it to work with V3.

This is the original: Stack-based Douglas Peucker line simplification routine by Dr. Gary J. Robinson. Let me know if you need the V3 script, but it shouldn’t be a problem to do the modifications yourself.

When I set the tolerance (kink as it’s called in the script) to 10 (meter), my polygons have a node drop from almost 600 to about 30, and still look about the same as what was drawn. I can still optimize the query a little to only use 7 decimal digits on the lats/longs, but for now that’s not needed.

Come to think of it, the amount of smoothing should be linked to the zoomlevel the map is at when drawing the polygon.

Update 18-Aug-2016: The V3 file is this one.

Jul 042013
 

I created a routine (Javascript) to do some free form drawing of a polygon in Google Maps, as opposed to the standard point-per-click polygon that comes with the standard library. Everything works great. The polygon is used to query a database (you’re drawing your filter, so to speak). A simple polygon around Amsterdam however results in a 900+ points polygon, making the query-string over 45K. Wow. That needs some optimization!

Jun 252013
 

The Google Maps API introduces styling of maps, like most people know when using OpenLayers (via SLDs) or OpenStreetMap (where you can create your own style, and share it with others). Google Maps styling is done in Javascript, as an extra option when creating the map. So there is no sharing option, and it’s not based on the SLD-standard, but I still think it’s a nice addition. Sometimes you don’t need the full color map, since it can distract from what you are showing.

Read more about the styling here.

You do need to set the visualRefresh to true, this will be the default in Google Maps API 3.14 and above.

google.maps.visualRefresh = true;
Jun 042013
 

If you need to use Google’s tiles in LeafletJS, you can follow the same URL structure as OpenStreetMap. The tile servers are mt0 .. mt3, and the XYZ are specified a little differently. Here you go:

L.tileLayer('http://{s}.google.com/vt/x={x}&y={y}&z={z}', {
            subdomains : ['mt0','mt1','mt2','mt3'],
            attribution: 'Tiles Courtesy of <a href="http://maps.google.com" target="_blank">Google</a>',
            maxZoom: 18
            }).addTo(map);
Sep 122011
 

This is a post to say that I created a -very basic- WFS client on Android. It gets point-features from GeoServer in GeoJSON format and displays them on top of a Google Maps view. You can only zoom in and out, and pan the map at the moment, but I made it work. YEAH!

Sep 092011
 

I’m creating a Maps applicition on Android. I had my location in an ItemizedOverlay, displaying a man-icon (similar to the yellow streetview marker). Then I wanted to add a layer with markers, so I created another ItemizedOverlay. But I can’t seem to add that to my MapView. As soon as I do that, I get a Forced Close.

Changing the first ItemizedOverlay to a MyLocationOverlay does not do the trick, the FC still kicks in as soon as I try to add the second overlay. I must be doing something wrong…….

Update: the initial code was created very late at night. And then things get mixed up. Don’t use before instantiate….DUH. Needless to say, it works now 😉